Skip to content

Instantly share code, notes, and snippets.

View littleq0903's full-sized avatar
🎱
Wanna see some magic?

CoColin littleq0903

🎱
Wanna see some magic?
View GitHub Profile

On master and nodes

Pull images form internet access laptop

docker pull gcr.io/google_containers/kube-apiserver-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-controller-manager-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-proxy-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-scheduler-amd64:v1.5.0
docker pull weaveworks/weave-npc:1.8.2
docker pull weaveworks/weave-kube:1.8.2
var projectId = ScriptProperties.getProperty("projectId");
function プロジェクトの取得() {
var list = BigQuery.Projects.list();
Logger.log(list);
}
@littleq0903
littleq0903 / javascript_resources.md
Created November 23, 2013 17:56 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@littleq0903
littleq0903 / css_resources.md
Created November 23, 2013 17:56 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@littleq0903
littleq0903 / python_resources.md
Created November 23, 2013 17:56 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

<iframe frameBorder="0" scrolling="no" width="300" height="250" marginwidth="0" marginheight="0" style="display: visible" src="http://ad.tagtoo.co/ad_g_300x250?pb=66&id=4#q=http%3A%2F%2Fwww.mayuki.com.tw%2F&p=%%SITE%%&cachebuster=%%CACHEBUSTER%%&click=%%CLICK_URL_ESC%%"></iframe>
import json
import logging
from google.appengine.ext import db
from google.appengine.api import users
import webapp2
# With routes like:
#app = webapp2.WSGIApplication([
# webapp2.Route("/d/<collection>", DataHandler, methods=["GET", "POST"]),
# webapp2.Route("/d/<collection>/<id>", DataHandler, methods=["GET", "PUT", "DELETE"]),
static PyObject *
string_concatenate(PyObject *v, PyObject *w,
PyFrameObject *f, unsigned char *next_instr)
{
/* This function implements 'variable += expr' when both arguments
are strings. */
Py_ssize_t v_len = PyString_GET_SIZE(v);
Py_ssize_t w_len = PyString_GET_SIZE(w);
Py_ssize_t new_len = v_len + w_len;
if (new_len < 0) {
@littleq0903
littleq0903 / test.py
Created October 31, 2013 03:56 — forked from georgefs/test.py
try:
from cStringIO import StringIO
except:
from io import StringIO
from datetime import datetime
def test_join():
data = []
for i in range(1000000):
data.append(str(i))