Skip to content

Instantly share code, notes, and snippets.

View ZoomQuiet's full-sized avatar
🖖
Sayeahooo

Zoom.Quiet ZoomQuiet

🖖
Sayeahooo
View GitHub Profile
#!/usr/bin/env python
# encoding: utf-8
"""
Usage:
fab deploy:appname
"""
from fabric.api import env, run, cd, local, put
env.hosts = ['myserver.com']
env.user = 'eric'
@darktable
darktable / app.yaml
Created March 16, 2011 19:10
GAE: App.yaml designed for serving a static site on Google App Engine (Python). Copy your static html and files into a folder called "static" next to app.yaml. Contains a bunch of mimetype declarations from html5boilerplate's .htaccess. May not be neces
application: you-app-name-here
version: 1
runtime: python
api_version: 1
default_expiration: "30d"
handlers:
- url: /(.*\.(appcache|manifest))
mime_type: text/cache-manifest
@necolas
necolas / README.md
Last active March 28, 2024 20:34
Experimenting with component-based HTML/CSS naming and patterns

NOTE I now use the conventions detailed in the SUIT framework

Template Components

Used to provide structural templates.

Pattern

t-template-name
@garnaat
garnaat / update_key.py
Created February 10, 2012 17:25
Update the content-type of an existing key in S3 using boto
import boto
s3 = boto.connect_s3()
bucket = s3.lookup('mybucket')
key = bucket.lookup('mykey')
# Copy the key onto itself, preserving the ACL but changing the content-type
key.copy(key.bucket, key.name, preserve_acl=True, metadata={'Content-Type': 'text/plain'})
key = bucket.lookup('mykey')
@lg0
lg0 / markdown.xml
Created April 10, 2012 19:58
Markdown Syntax Highlighting for Sublime text 2
<!-- copy this to YOUR_THEME.tmTheme-->
<dict>
<key>name</key>
<string>diff: deleted</string>
<key>scope</key>
<string>markup.deleted</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#EAE3CA</string>
@lalabear
lalabear / controllers.js
Created July 21, 2012 01:52
邊學AngularJS邊做Todo List第四回
function TodoCrtl($scope) {
$scope.newItem = '';
$scope.todoList = [];
$scope.addItem = function(){
if(this.newItem){
this.todoList.push({label:this.newItem});
this.newItem = '';
}
}
@greatghoul
greatghoul / 265g_pics.py
Created September 26, 2012 17:22
265g.com 美图下载
#-*- coding: utf-8 -*-
import urllib, re, os, argparse
RE_NEXT_URL = ur'<a href=\"(?!javascript\:)([^\"]*?)">下一页<\/a>'
RE_PICTURE = ur'<p\s+(?:align=\"center\")>\s*<img.*?src=\"(.*?)\".*?\/?>'
RE_ARCTITLE = ur'var arctitle=\'(.*?)\';'
def get_html(url):
try:
return urllib.urlopen(url).read().decode('gbk')
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 17, 2024 02:53
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@IngmarBoddington
IngmarBoddington / statusCodes
Last active March 22, 2024 21:35
HTTP Status Codes / Verbs List
CONNECT
DELETE
GET
HEAD
OPTIONS
PATCH
POST
PUT
TRACE
@hanguokai
hanguokai / notify.js
Created April 28, 2013 10:29
本代码为 Google Apps Script 。 用于读取 Google Drive 中的报名表(电子表格),去除重复数据,并根据姓名和 Email 地址发送通知邮件。
//已发送邮件的标记内容
var EMAIL_SENT = "EMAIL_SENT";
//记录已发送记录的列,一般为原有数据的后面一列,从0开始
var EMAIL_SENT_COLUMN = 9;
// 发送的邮件主题
var SUBJECT = "北京GDG之编程语言沙龙参会确认函";
// email 所在的列,从0开始算