Skip to content

Instantly share code, notes, and snippets.

@jmsevold
jmsevold / array-removal.js
Created January 21, 2016 19:41
Remove an item from an array without mutating array
var list = ['a', 'b', 'c','d'];
var removeFromArray = (list,index) => {
var before = list.slice(0, index);
var after = list.slice(index + 1, list.length);
var result = before.concat(after);
return result;
};
@Dr-Nikson
Dr-Nikson / README.md
Last active June 8, 2023 12:04
Auth example (react + redux + react-router)
@jacqui
jacqui / gist:983051
Created May 20, 2011 14:43 — forked from pauldix/gist:981916
Redis SORT command examples
# Optimized for writes, sort on read
# LVC
redis.hset("bonds|1", "bid_price", 96.01)
redis.hset("bonds|1", "ask_price", 97.53)
redis.hset("bonds|2", "bid_price", 95.50)
redis.hset("bonds|2", "ask_price", 98.25)
redis.sadd("bond_ids", 1)
redis.sadd("bond_ids", 2)