Skip to content

Instantly share code, notes, and snippets.

View alivelee's full-sized avatar

徐磊 alivelee

  • Shanghai
View GitHub Profile

TABLE OF CONTENTS

  1. Meet Python - Python Basics
  2. Sharing Your Code
  3. Files and Exceptions
  4. Persistence: Saving Data to Files
  5. Comprehending Data
  6. Custom Data Objects
  7. Web Development
  8. Mobile App Development

TABLE OF CONTENTS

  1. Java Basics
  2. Classes, Objects, References, Arguments, Return Values, ArrayLists, Interfaces, Inheritance, and Polymorphism
  3. Object References on the Stack
  4. Constructors and the Garbage Collector
  5. Static and Final
  6. Exception Handling
  7. Events
  8. Graphics
## {{{ http://code.activestate.com/recipes/532908/ (r3)
#! /usr/bin/env python
"""
pyText2Pdf - Python script to convert plain text files into Adobe
Acrobat PDF files with support for arbitrary page breaks etc.
Version 2.0
Author: Anand B Pillai <abpillai at gmail dot com>
Index: openvpn-2.2.1/socket.c
===================================================================
--- openvpn-2.2.1.orig/socket.c 2012-11-23 16:32:15.000000000 +0800
+++ openvpn-2.2.1/socket.c 2012-11-23 16:32:44.000000000 +0800
@@ -48,6 +48,16 @@
#endif
};
+int
+buffer_mask (struct buffer *buf, int mask) {
<snippet>
<content><![CDATA[
// ${1} Resource
Route::get('${1}s', array('as' => '${1}s', 'uses' => '${1}s@index'));
Route::get('${1}s/(:any)', array('as' => '${1}', 'uses' => '${1}s@show'));
Route::get('${1}s/new', array('as' => 'new_${1}', 'uses' => '${1}s@new'));
Route::get('${1}s/(:any)edit', array('as' => 'edit_${1}', 'uses' => '${1}s@edit'));
Route::post('${1}s', '${1}s@create');
Route::put('${1}s/(:any)', '${1}s@update');
Route::delete('${1}s/(:any)', '${1}s@destroy');
CREATE DATABASE profs;
USE profs;
CREATE TABLE professors (
name varchar(30) NOT NULL,
specialization varchar(20),
salary double(8,2),
CONSTRAINT prof_pk PRIMARY KEY (name));
CREATE TABLE students (

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@alivelee
alivelee / route.sh
Last active August 29, 2015 14:10 — forked from kevinzhow/route.sh
route = 8.0.0.0/255.0.0.0
route = 58.0.0.0/255.0.0.0
route = 23.0.0.0/255.0.0.0
route = 117.0.0.0/255.0.0.0
route = 199.0.0.0/255.0.0.0
route = 190.0.0.0/255.0.0.0
route = 198.0.0.0/255.0.0.0
route = 173.0.0.0/255.0.0.0
route = 174.0.0.0/255.0.0.0
route = 168.0.0.0/255.0.0.0
@alivelee
alivelee / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console