Skip to content

Instantly share code, notes, and snippets.

var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@mimosz
mimosz / smser.rb
Created August 23, 2012 16:00
短信宝
# -*- encoding: utf-8 -*-
require 'digest/md5'
require 'nestful'
class Smsbao
def initialize(login, passwd)
@login = login
@passwd = Digest::MD5.hexdigest(passwd.to_s)
end
@zythum
zythum / gist:2848881
Created June 1, 2012 04:50
google收录的敏感词
@paulmillr
paulmillr / active.md
Last active May 15, 2024 02:25
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 1000)
@panthomakos
panthomakos / benchmark.rb
Created May 3, 2012 20:06
Benchmark Your Bundle
#!/usr/bin/env ruby
require 'benchmark'
REGEXPS = [
/^no such file to load -- (.+)$/i,
/^Missing \w+ (?:file\s*)?([^\s]+.rb)$/i,
/^Missing API definition file in (.+)$/i,
/^cannot load such file -- (.+)$/i,
]
@mirisuzanne
mirisuzanne / 1_index.html
Created April 4, 2012 22:58
Suggested syntax for responsive Susy layouts
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>test</title>
<link rel="stylesheet" href="stylesheets/screen.css">
</head>
<body>
<div class="container c1"></div>
<div class="container c2"></div>
@hzlzh
hzlzh / GitHub-Shop-Group-Purchase.md
Created February 22, 2012 06:25
GitHub Shop Group Purchase

#GitHub Shop Group Purchase ###By:@[hzlzh] 活动地址:http://shop.github.com/
V2EX:[http://www.v2ex.com/t/27492][V2EX]

##活动经验提炼:(写给今后可能的,别的组织者)

  • 仅此一次,本人不会再组织GitHub团了,如果只买贴纸可以考虑。因为瓷器和玻璃制品易碎,在快递行业中和iPad属于一个级别的易损坏品。申通和圆通这类的会拒发,而且不能保价。 (来源于SF快递员)
  • 如果有人要买GitHub Shop中的东西,依然建议另寻组团购买,原因如下:
  1. 组团官方使用大箱子发送到中国,这期间会很安全,你想想,会有那个快递员疯了去扔大箱子?(快递的分发是空抛这种扔来扔去的这个是快递行业内部无法避免的),一个小盒子过来中国,八成会碎,先走UPSP然后是国内邮政平邮
  2. 美国->中国 邮费 $20或$30两个档次,差不多¥100多邮费,比有些东西还贵,如果几个朋友一起,何乐而不为?
@burke
burke / 0-readme.md
Created January 27, 2012 13:44 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@geirarne
geirarne / config.rb
Created November 3, 2011 17:58
Helper for HTML5 Boilerplate-style IE conditionals in Middleman with HAML. Thanks to http://ricostacruz.com/2010/haml_and_ie_compatibility.html
helpers do
def conditional_html(opts={}, &blk)
attrs = opts.map { |(k, v)| " #{h k}='#{h v}'" }.join('')
[ "<!--[if lt IE 7 ]> <html#{attrs} class='ie6 no-js oldie'> <![endif]-->",
"<!--[if IEMobile 7 ]> <html#{attrs} class='iemob7 no-js oldie'> <![endif]-->",
"<!--[if IE 7 ]> <html#{attrs} class='ie7 no-js oldie'> <![endif]-->",
"<!--[if IE 8 ]> <html#{attrs} class='ie8 no-js oldie'> <![endif]-->",
"<!--[if IE 9 ]> <html#{attrs} class='ie9 no-js oldie'> <![endif]-->",
"<!--[if (gt IE 9)|!(IE)]><!--> <html#{attrs} class='no-js'> <!--<![endif]-->",
capture_haml(&blk).strip,