Skip to content

Instantly share code, notes, and snippets.

@venj
venj / down_celebrating_steve.rb
Created October 24, 2011 02:22
Download "A Celebration of Steve's Life" from apple. http://events.apple.com.edgesuite.net/10oiuhfvojb23/event/index.html This script is based on previous WWDC keynote download script: https://gist.github.com/1012426
#!/usr/bin/env ruby
require 'open-uri'
if ["--help", "help", "-h"].include?(ARGV[0]) || ARGV.size < 1
puts "Usage: #{File.basename __FILE__} ( 540p | 540i | 360p | 360i | 360is | 224p )"
exit 0
end
size_hash = {"540p" => "2540", "540i" => "1840", "360p" => "1240", "360i" => "0640", "360is" => "0440", "224p" => "0240"}
video_size = size_hash[ARGV[0]]
@fxsjy
fxsjy / gist:3244607
Created August 3, 2012 05:16
Simple Memcached server in Javascript with 100 lines of code
/* Simple Memcached in Javascript
* @Author: Sun, Junyi
* @Email: ccnusjy@gmail.com
* @Date: 2012-8-3
*/
var net = require('net');
var store = {}
function handle_header(header,crlf_len){
var tup = header.split(" ")
@benschw
benschw / Dockerfile
Last active October 1, 2018 18:30
MySQL Docker Container
FROM ubuntu
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -s /bin/true /sbin/initctl
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get -y install mysql-client mysql-server
@mitchelloharawild
mitchelloharawild / twitter_list_members.R
Last active March 6, 2019 07:06
Code for obtaining a list of members from twitter
library(httr)
library(purrr)
token <- rtweet:::check_token(NULL)
dsw <- GET(url = "https://api.twitter.com/1.1/lists/members.json?slug=women-in-data-science&owner_screen_name=becomingdatasci&cursor=-1&count=5000&skip_status=1", token)
map_chr(content(dsw)$users, "screen_name") %>% sort %>% cat(sep = "\n")
#> ___dhara___
#> __Helma
#> _ajbc
#> _beenkim
#> _ehinosa
@tomdale
tomdale / gist:3981133
Last active November 26, 2019 21:19
Ember.js Router API v2

WARNING

This gist is outdated! For the most up-to-date information, please see http://emberjs.com/guides/routing/!

It All Starts With Templates

An Ember application starts with its main template. Put your header, footer, and any other decorative content in application.handlebars.

<header>
@stefanfoulis
stefanfoulis / osx_developer_installation.rst
Last active December 23, 2019 02:32
Instructions on how to setup an OSX developer machine for (python/django) development

OSX Developer System installation

This guide assumes a fresh install of Mac OSX 10.7 Lion.

Brew User

@border
border / Makefile
Created January 12, 2011 01:36
json example in golang
include $(GOROOT)/src/Make.inc
GOFMT=gofmt -spaces=true -tabindent=false -tabwidth=4
all:
$(GC) jsontest.go
$(LD) -o jsontest.out jsontest.$O
format:
$(GOFMT) -w jsontest.go
@khushjammu
khushjammu / Primer: iOS Design with Figma.md
Last active June 1, 2020 08:23
A primer for doing iOS designs with Figma.

Primer: iOS Design with Figma

Disclaimer: I am definitely not an expert on either design or iOS development.

I recently had to use Figma to do the designs for an iOS app. Here's a quick primer you might find useful.

Topics covered: app screens, icons, iPhone mockups, and App Store previews.

Step 1: App Screens

@gabrielhurley
gabrielhurley / openstack_translation.rst
Created June 22, 2012 00:02
Translation, Internationalization and Localization in OpenStack

Translation, Internationalization and Localization in OpenStack

OpenStack is committed to broad international support, and as such there must be an ongoing concern with making OpenStack usable for all audiences. This includes proper use of internationalization and localization tools by developers, and high-quality translations for both user-facing messages and documentation.

Table of Contents

@ikbear
ikbear / NetScreen.md
Created December 5, 2012 17:17
NetScreen的往事

下面是陈首席陈临怀发表在微博上的 [NetScreen的往事],我在看的过程中将其拷贝出来,整理成文,方便想看的人一口气看完。微博见:http://weibo.com/huailinchen

[NetScreen的往事]下午要在厦门见邓锋。突然又想起了许多NetScreen的往事。我是一个能写代码的文艺青年。决定在weibo上,来写写过去,算作为逐渐老去的我们的一点纪念。。。

[NetScreen的往事(1)]2001年的9月11日的早晨。我大概7点左右被人叫醒。纽约遭遇攻击!“。在电视上我看着第2架飞机冲入Tower Building,恍惚做梦一般。。。 上午去公司。。。大家都很担心。知道NetScreen的创办人Feng和Yan也在纽约,处理公司上市的事情。大家都很担心他们。我们是兄弟。

[NetScreen的往事(2)]应该是中午的时候传来消息。他们已经跑到亚特兰大去了。在等待转机。。。大家都在等着他们的回来。记得是晚上7点左右,夏天的加州,依然天很亮。我和Shalang(现Juniper Beijing Director)在楼下抽烟。看见Feng和Yan下车了。。。我是个很感情化的人,冲上去拥抱了Feng。

[NetScreen的往事(3)]Yan是个比较严肃的人,而我的工作基本上是他和Yuming[Palo Alto创办人,今年上市,发大了]直接领导。他经常修理我。有点怕他。不敢和他拥抱。Feng很随和,喜欢开玩笑[含黄色段子]。大家都喜欢他。。。