Skip to content

Instantly share code, notes, and snippets.

@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 31, 2024 22:29
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@aaronblohowiak
aaronblohowiak / gist:3932768
Created October 22, 2012 17:23
RedisConf Notes Part I
Redisconf Notes:
"We will begin this morning with a performance"
"Is this a key store..." Bohemian Rhapsody Key/Value Store ballad. Epic Win!
"Any way the data flows doesn't really matter to me... flushdb..."
"Lua killed a db by writing after calling a nondeterministic function..."
"Got to leave SQL behind and face the truth..."
"Redis, I don't want to join, sometimes I wish I'd never described a query..."
"The ZSET has some data set aside for me, for me, for MEEEEEEE"
@aaronblohowiak
aaronblohowiak / gist:3933451
Created October 22, 2012 19:10
RedisConf Notes Part II
Dr Josiah Carlson
- Redis user for 2 1/2 years. Extremely active on redis mailing list, #3 poster to the list (applause from PN)
- Author of Redis In Action (available electronically)
- What is search? scan text, use BM/BMG/KMP or regex or recursive-descent.. or suffix tries.. or you can search through the zip-format (BWT)
- Inverted index: words to documents, instead of crawling documents for words.
- SET per word with items for each docid, using redis' intersection for AND, union for OR
- "Simplest example that will be useful..[but it wont be that useful... buy the book!]"
- Demo of his editor.. its on sourceforge.
- Tokenization, stop words in some python code.. "with this stuff, we're going to implement search" already has failing tests written.. live coding, so not many notes... buy his book.
- "I have 5 minutes? I thought this was a 45-minute talk".. "Nope!"..."Shoot!"
@aaronblohowiak
aaronblohowiak / gist:3934073
Created October 22, 2012 20:44
RedisConf Notes Part III
Lightning talk: BigCache:
* redis distributed fault-tolerant memory cache as a service (OSS)
* memcache binary protocol compatible
* TCP loadbalanced / consistent hashing algo, ZK for coordination services
* github.com/mercadolibre/bigcache
EvilSha: misadventures in the land of lua. Adam Baldwin: @adam_baldwin
* What can we do that is evil with Redis?
* Listed all functions you have access to in lua in redis; pretty locked-down
@aaronblohowiak
aaronblohowiak / gist:3935007
Created October 22, 2012 22:21
RedisConf Notes Part IV
Redis Pain - Matt @mranney from Voxer (did node-redis)
* Asked to talk about redis stress points.. "no stress, things work for a while and there is no stress and then... you enter a world of pain."
* Pain from how we use it at Voxer. Explanation of Voxer and its use cases.
* People assume Voxer is "how hard can it be?".. "That's how it used to be until we got a bunch of pictures..."
* Growth curve looks like Pinterests "might be the same because there was no label on the y-axis.. might be EXACTLY the same."
* Computers are hard... nothing works as it is supposed to... and eventually you fly into nerd rage and then you become a curmmudgeon... getting serious, this isn't real pain -- we aren't selling stree sheets -- this are great problems to have...
* They use redis as cache for Riak, also for rapidly changing data, "data we can afford to lose", throttling, NO SAVING.
* "We really like redis."
* "When we first started building voxer, I never understood why people use Redis at all... we have a db and .
@aaronblohowiak
aaronblohowiak / gist:3935671
Created October 23, 2012 00:02
RedisConf Notes Part V
Notes from my talk are here:
https://gist.github.com/3935383
"Doing crazy stuff in redis" - Fitzy @fritzy from &Yet
* Everything on the internet is feeds in feeds, your follower list, your status updates..
* XMPP pubsub interface, called ZUMP, was XEP60.. it "kinda sucked" and "was really slow"
* I wanted something that fans out messages and was fast and if only there was something that already did that -- well they did, and it was redis.
* Implemented XEP60 in redis, and it was fast and awesome. "And then I had an epiphany"
* "I didn't need XMPP, this could be useful for ANY API..." events, and publishing messages could be useful for all the apis. "I know some of you JavaScripters think there's just HTTP, but there is a whole world of Protocols and APIs that could benefit."
* "What if we had CRUD events that came out of custom objects that weren't just feeds?"
@Warry
Warry / Article.md
Created December 11, 2012 00:11
How to make faster scroll effects?

How to make faster scroll effects?

  • Avoid too many reflows (the browser to recalculate everything)
  • Use advanced CSS3 for graphic card rendering
  • Precalculate sizes and positions

Beware of reflows

The reflow appens as many times as there are frames per seconds. It recalculate all positions that change in order to diplay them. Basically, when you scroll you execute a function where you move things between two reflows. But there are functions that triggers reflows such as jQuery offset, scroll... So there are two things to take care about when you dynamically change objects in javascript to avoid too many reflows:

@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@shrayasr
shrayasr / OLD_OLD_OLD_install_tmux_osx_no_brew.html
Last active July 17, 2023 14:45
[OBSOLETE] Install tmux on OSX WITHOUT brew
# Create a directory
mkdir ~/tmux-install
cd ~/tmux-install
# Get the files
curl -OL http://downloads.sourceforge.net/tmux/tmux-1.5.tar.gz
curl -OL http://downloads.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.16-stable.tar.gz
# Extract them
tar xzf tmux-1.5.tar.gz