Weekly roundup - 5


** Leaf - Machine Learning for Hackers http://autumnai.com/leaf/book/leaf.html Personal info of 93.4 million Mexicans exposed on Amazon http://www.databreaches.net/personal-info-of-93-4-million-mexicans-exposed-on-amazon/ Very cute chart library chart.js http://www.chartjs.org/ An alternative chart library http://metricsgraphicsjs.org/ Github has ~12M open issues https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+ 52 technologies you need to learn in 2016 https://github.com/shekhargulati/52-technologies-in-2016 GAE get_all http://stackoverflow.com/questions/3195647/how-to-get-checkbox-data-using-python-on-gae How Kalman filters work http://www.anuncommonlab.com/articles/how-kalman-filters-work/*

Weekly roundup - 4 #leak #privacy #torrent #swift


A panorama night shot with Nexus 6p, 2015 Apple use swift only in calculator app in iOS. https:[email protected]/is-apple-using-swift-4a6c80f74599#.d35wfcl91 Turkish citizenship data leaked (50m records) https://twitter.com/dchest/status/716934572949299200 Panama Papers leak ng-infinite-scroll CDN https://cdnjs.cloudflare.com/ajax/libs/ngInfiniteScroll/1.2.2/ng-infinite-scroll.min.js Easiest terminal torrent client: Aria2c wget http://example.com/some.torrent sudo apt-get install aria2 aria2c some.torrent Today I learnt (TIL), there is a neo4j alternative developed by a Googler: https://github.com/google/cayley Read large files with python without pullling whole file into memorywith open("log.txt") as infile: for line in infile: do_something_with(line) Impressive: Grindr Manages More than 1,800,000 API Calls Per Minute with Less than 5 Engineers - W...

Weekly roundup - 3 #instagram #api #css #aprilfools


San Francisco 2015, Oneplus One Example Instagram Api call Following: https://api.instagram.com/v1/users/USER_ID/follows?access_token=TOKEN Posts https://api.instagram.com/v1/users/USER_ID/media/recent?access_token=TOKEN RxJava: Reactive Extensions for Java AirBnb switched to RxJava on Android app https://realm.io/news/kau-felipe-lima-adopting-rxjava-airbnb-android/ Reactive programming Evolution of Go https://talks.golang.org/2015/gophercon-goevolution.slide#21 Ubuntu tablet edition pre orders http://www.bq.com/uk/aquaris-m10-ubuntu-edition Very beautiful HTML/CSS templates: http://html5up.net/ Kubernetes handles 10m qps with zero downtime, impressive video http://blog.kubernetes.io/2016/03/1000-nodes-and-beyond-updates-to-Kubernetes-performance-and-scalability-in-12.html “Modern computing: typing at a regular ...

Weekly Roundup - 2 #npm #npmgate #go #ai


2015, Dublin - Oneplus One“The ones that love us never really leave us”.(Sirius Black (Harry Potter)) Internet is broken by an angry programmer who is totally right: I’ve Just Liberated My Modules A discussion about the breaking of the Internet Business insider explains the situation simply For people who uses npm for left-pad which was unpublished by Azer, can do this for fixing the builds: (Because code is still in github; just not in npm anymore)"dependencies": { "left-pad": "git+ssh:[email protected]:azer/left-pad"}OR shortcut:"dependencies": {"left-pad": "azer/left-pad"} Situation on the npm side:Fun fact: because of all the metadata, the javascript community downloads “isarray” in the excess of 100GB a month from npm. For a one linerTweet More JS comedy when it’s digged deeper: Tweet Reddit “Saturday night data mining: #golang contributors by date” Tweet New trend: Reply everything with “willing to r...

Redcarpet instead of kramdown as markdown renderer


Vieux Port de Montréal, October 2015 - Oneplus oneRedcarpet is the engine written in C by Github, It’s also known as Github flavored markdown. I’ve been using kramdown since the beginning but apparently redcarpet has some cool features like autolinking.For example if you put a link in your post without using <url> notation or [url text](url), kramdown does not convert those urls into <a> tags. Instead it renders them as raw text in <p> tag.Here is my config.yaml:markdown: redcarpetkramdown: input: GFM hard_wrap: falseredcarpet: extensions: ["autolink", "fenced_code_blocks"]Here is the full list of available redcarpet extensions:https://github.com/vmg/redcarpetBtw fenced codeblocks kicks ass, just put your code like this:```foo.bar()```

Serving subdomains of localhost, no apache2 conf needed


Trabzon, August 2015 - Oneplus OneFor my latest project, I implemented subdomain handling, however, I wasn’t able to test it from my local; pushing to production and try from the real domain and subdomain was so hard. When I look at the tutorials, they are mostly php stuff containing apache2 configurations, virtualhosts etc. I needed a simple method for this. Modify content of hosts file$ sudo nano /etc/hosts Example configuration127.0.0.1 localhost127.0.0.1 hakan.localhost Install web.py just for the sake of trial.$ sudo easy_install web.py Create a file$ touch main.py Paste this content:import web urls = ( '/(.*)', 'hello')app = web.application(urls, globals())class hello: def GET(self, name): if not name: name = 'World' return 'Hello, ' + name + '!'if __name__ == "__main__": app.run() Run the file.$ python main.pyOpen browser and go:

Rename files sequentially in a folder #bash


The output will be something like 0001.jpg, 0002.jpg etc. You can change the number of digits by modifying %04d part.a=1for i in *.jpg; do new=$(printf "%04d.jpg" "$a") #04 pad to length of 4 mv -- "$i" "$new" let a=a+1doneThanks SO

Weekly Roundup - 1


Flat Montreal is Flat - October, 2015 I read a lot of blog posts, RSS feeds, watch too many videos, solve too many big/little problem during the week. So instead of keeping them in my Keep; I decided to put small snippets here so that I can find them again easily and also maybe some other people can see it. I don’t know if I can write this every week. However, I’m a huge fan of HighScalability’s “Stuff the internet says on scalability” series. I’d like to do something like that. Since I’m not a master like them, mine will be a lot simpler, less sophisticated of course. I will also try to put some photos that I take on the way of being smartphone photographer :P Write ahead logginghttps://www.sqlite.org/wal.html A cool site:http://foundmagazine.com/ Another addictive game:https://play.google.com/store/apps/details?id=com.ketchapp.stack Google’s cute programming memories: https://bar.foo/ [web.py] CSRF decorator is not complaint with app process...

Solving nodejs error: Cannot find module 'are-we-there-yet'


This happened to me while playing with Web Starter Toolkit (WST)Problemweb_start_kit_hello npm install --global gulp && npm installmodule.js:340 throw err; ^ Error: Cannot find module 'are-we-there-yet' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:2:16) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17)Solution:Go to the global node_modules directory (npm root -g if you don’t know)$ cd /usr/local/lib/node_modulescurl -L https://www.npmjs.com/install.sh | sh

Solving mongodb's user creation problem


I have been test driving mongodb with some serious projects. I have always had difficulty in creating users in any database. Mongodb was no surprise.Here is the working command for me. Error 2016-02-16T01:28:27.570+0000 Error: couldn’t add user: User [email protected] already exists at src/mongo/shell/db.js:1004 First add the user: mongo localhost:12346> use admin> db.createUser({ user: "test1", pwd: "test", roles:[ { role: "readWrite", db: "isimibul-dev" }]}) Now connect by using the user:mongo localhost:12346/mydb-dev -u test1 -p testOne side note: If you are having difficulties with connecting to the DB, you can change auth mechanism to MONGODB-CR, this is the old system used back in the days of v2.4; now SHA is used for auth, if you are using an updated version like v3, just use SHA as auth mechanism.


subscribe via RSS