This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get update | |
$ sudo apt-get install git curl build-essential libssl-dev | |
$ git clone https://github.com/creationix/nvm.git ~/.nvm | |
$ . ~/.nvm/nvm.sh | |
$ nvm install 0.6.13 | |
$ sudo /home/ubuntu/.nvm/v0.6.13/bin/node -v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title> | |
</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, user = require('./routes/user') | |
, http = require('http') | |
, path = require('path'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd yakju-jwr66v | |
$ adb reboot bootloader | |
$ ./flash-all.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ django-admin.py startproject django_test | |
$ cd django_test/ | |
$ python manage.py runserver |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf-8 -*- | |
import json | |
import sqlite3 | |
JSON_FILE = "some.json" | |
DB_FILE = "some.db" | |
traffic = json.load(open(JSON_FILE)) | |
conn = sqlite3.connect(DB_FILE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for row in csv.reader(data): | |
params = ', '.join(map(lambda s: '?', row)) | |
c.execute('''insert into %s values (%s) ''' % (table_name, params), row) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Uncomment these lines (and the ones in the generated Gemfile) if you want | |
# to live on the Edge: | |
# | |
# Vagrant.require_plugin "vagrant-berkshelf" | |
# Vagrant.require_plugin "vagrant-omnibus" | |
Vagrant.configure("2") do |config| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#repo/Berkshelf | |
cookbook 'nginx', '~> 0.1.0', path: 'site-cookbooks/nginx' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""http://ginstrom.com/scribbles/2007/10/08/design-patterns-python-style/ | |
An example of the Template pattern in Python""" | |
ingredients = "spam eggs apple" | |
line = '-' * 10 | |
# Skeletons | |
def iter_elements(getter, action): | |
"""Template skeletons that iterates items""" |
OlderNewer