This file contains 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
from extensions import db | |
class Base(object): | |
def save(self): | |
db.session.add(self) | |
db.session.commit() |
This file contains 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
import unittest | |
from flask.ext.testing import TestCase | |
from testconfig import TestConfig | |
from admin import app | |
from admin.urls import url_routes | |
from init_app import create_app | |
from extensions import db | |
def assertCreate(models): |
This file contains 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 -*- | |
__all__ = ["DB", ] | |
import contextlib | |
import psycopg2 | |
from psycopg2 import extensions | |
from gevent.socket import wait_read, wait_write |
This file contains 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
app.info_plist['UIStatusBarStyle'] = 'UIStatusBarStyleBlackTranslucent' | |
app.info_plist["UIViewControllerBasedStatusBarAppearance"] = false |
This file contains 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
#!/bin/bash | |
echo Building Google Protobuf for Mac OS X / iOS. | |
echo Use 'tail -f build.log' to monitor progress. | |
( | |
PREFIX=`pwd`/protobuf | |
mkdir ${PREFIX} | |
mkdir ${PREFIX}/platform |
This file contains 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
#include <Bridge.h> | |
#include <FileIO.h> | |
#include "DHT.h" | |
#define DHTPIN A0 | |
#define DHTTYPE DHT11 | |
#define SOUND A1 | |
#define LIGHT A2 | |
DHT dht(DHTPIN, DHTTYPE); | |
String getTempAndHum(); |
This file contains 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
#include <OpenGL/gl3.h> | |
#include <GLUT/glut.h> | |
void init(){ | |
glClearColor(1.0, 1.0, 1.0, 0.0); | |
glMatrixMode(GL_PROJECTION); | |
gluOrtho2D(0, 200, 0, 150); | |
} | |
void lineSegment(){ |
This file contains 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
set nocompatible " be iMproved | |
filetype off " required! | |
set nobackup | |
set nowritebackup | |
" Close bell | |
set vb t_vb= | |
set mouse=a |
This file contains 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
// Generated by gfwlist2pac | |
// https://github.com/clowwindy/gfwlist2pac | |
var domains = { | |
"vimcasts.org" : 1, | |
"vim.org" : 1, | |
"wenincode.com" : 1, | |
"amazonaws.com" : 1, | |
"codeception.com" : 1, | |
"opensuse.org" : 1, |
This file contains 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
execute pathogen#infect() | |
filetype plugin indent on | |
syntax on | |
set nu | |
set tabstop=2 | |
set shiftwidth=2 | |
set softtabstop=2 | |
set expandtab |
OlderNewer