Skip to content

Instantly share code, notes, and snippets.

View shinyzhu's full-sized avatar
🗣️
Talk to me

Shiny shinyzhu

🗣️
Talk to me
View GitHub Profile
@shinyzhu
shinyzhu / 01-introduction.md
Created April 23, 2024 07:44 — forked from CliffordAnderson/01-introduction.md
Exploring the U-Bahn with Neo4j

Analyzing the U-Bahn Network with Neo4J

The goal of this exercise is to extract information about the Berlin metro system from Wikidata and to analyze its relationships with Neo4j.

Berlin U-Bahn Map

@shinyzhu
shinyzhu / create-redis-cluster.sh
Last active March 3, 2019 03:13 — forked from abhirockzz/create-redis-cluster.sh
Use redis-cli to create a Redis Cluster on Docker (with Redis 5.0)
#------------ bootstrap the cluster nodes --------------------
redis_image='redis:5'
network_name='host' # must be in host mode
#---------- create the cluster ------------------------
for port in `seq 6379 6384`; do \
start_cmd="redis-server --port $port --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --appendonly yes"
docker run -d --name "redis-"$port -p $port:6379 --net $network_name $redis_image $start_cmd;
var z="http://gist.github.com/",y=document.write,x=$("body"),w=$("p.gist").map(function(b,a){a=$(a);var c=$("a",a),u=c.attr("href");if(c.length&&u.indexOf(z)==0)return{p:a,id:u.substring(z.length)}}).get(),v=function(){if(w.length==0)document.write=y;else{var b=w.shift();document.write=function(){document.write=function(a){b.p.replaceWith(a);v()}};x.append('<scr'+'ipt src="'+z+b.id+'.js"></scr'+'ipt>')}};v();
@shinyzhu
shinyzhu / Base58Encoder.h
Created July 8, 2011 03:16
ObjC implementation of base 58 encoding for Flic.kr URLs.
@interface Base58Encoder : NSObject {
}
+ (NSString *)base58EncodedValue:(long long)num;
@end