Skip to content

Instantly share code, notes, and snippets.

@josiahcarlson
josiahcarlson / zunion_range_score.py
Last active August 29, 2015 13:57
Zunion Range Score, an interesting scripting solution.
'''
Written on March 28, 2014 by Josiah Carlson
Released into the public domain
ZUNIONRANGESCORE:
Zunion Range Score performs a Redis ZUNIONSTORE operation, selecting *only
those items in the provided ranges. The scores are added. Proof of concept.
Warning: untested, use at your own risk.
@ducu
ducu / top_100_newsycombinator.md
Last active August 29, 2015 14:24
Top 100 most followed by @newsycombinator followers

Top most followed by @newsycombinator's followers

Rank Popularity Followers Friends Name (@twitter)
1 98020 105062 2 Hacker News (@newsycombinator)
2 48503 5350899 683 TechCrunch (@TechCrunch)
3 41285 23286724 166 Bill Gates (@BillGates)
4 35720 2334285 48 Elon Musk (@elonmusk)
5 34611 11758308 448 Google (@google)
6 34424 4816092 217 WIRED (@WIRED)

1. Create a folder in Dropbox or Google Drive

We'll use ~/Dropbox/Macnotes in this example

2. Copy the notes folder to the new folder in Dropbox or Google Drive

We'll use Finder for this instead of terminal as the cp -r command also copies the contents of all aliases and the Notes folder has a lot of those. Quit notes Open terminal and enable hidden files in Finder:

defaults write com.apple.finder AppleShowAllFiles YES.
@luckydev
luckydev / gist:b2a6ebe793aeacf50ff15331fb3b519d
Last active April 3, 2025 18:13
Increate max no of open files limit in Ubuntu 16.04/18.04 for Nginx
# maximum capability of system
user@ubuntu:~$ cat /proc/sys/fs/file-max
708444
# available limit
user@ubuntu:~$ ulimit -n
1024
# To increase the available limit to say 200000
user@ubuntu:~$ sudo vim /etc/sysctl.conf
@bobdobbalina
bobdobbalina / Chrome Remote Debugging
Created May 21, 2020 21:16
Mac Terminal command to open Chrome in remote debugging mode
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222