Skip to content

Instantly share code, notes, and snippets.

Avatar
Focusing

Xiaolin Zhang leoncamel

Focusing
View GitHub Profile
View highlight.rb
require 'formula'
class Highlight < Formula
url 'http://www.andre-simon.de/zip/highlight-3.8.tar.bz2'
homepage 'http://www.andre-simon.de/doku/highlight/en/highlight.html'
sha1 '007a008f1846485e86ad9347f98f69a22afeb718'
depends_on 'boost'
depends_on 'lua'
View win-switch-1.0.2.el
;;; win-switch.el --- fast, dynamic bindings for window-switching/resizing
;; Copyright (C) 2011, 2012 Christopher R. Genovese, all rights reserved.
;; Author: Christopher Genovese <genovese@cmu.edu>
;; Maintainer: Christopher R. Genovese <genovese@cmu.edu>
;; URL: http://www.stat.cmu.edu/~genovese/emacs/win-switch/
;; Version: 1.0.2
;; Update#: 12
View lion-fullscreen-leon.patch
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index df0ddd7..c576f02 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -930,6 +930,10 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
(add-to-list 'frame-creation-function-alist '(ns . x-create-frame-with-faces))
(add-to-list 'window-system-initialization-alist '(ns . ns-initialize-window-system))
+(declare-function ns-toggle-fullscreen-internal "nsfns.m" ())
+(defun ns-toggle-fullscreen ()
View 10_mac_environ.patch
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index 77e5675..759080a 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -382,17 +382,12 @@ _GL_WARN_ON_USE (dup3, "dup3 is unportable - "
# if !@HAVE_DECL_ENVIRON@
/* Set of environment variables and values. An array of strings of the form
"VARIABLE=VALUE", terminated with a NULL. */
-# if defined __APPLE__ && defined __MACH__
-# include <crt_externs.h>
View gist:10d165c24d59db1ca09b
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
def build_argparser():
parser = argparse.ArgumentParser()
parser.add_argument('--foo', action='store_true', help='foo help')
View download_on_time_data.sh
#!/bin/bash
#
# Reference : http://www.transtats.bts.gov/DL_SelectFields.asp?Table_ID=236&DB_Short_Name=On-Time
#
now=`date +"%Y-%m-%d" -d "01/01/1987"`
end=`date +"%Y-%m-%d" -d "05/01/2015"`
# end=`date +"%Y-%m-%d"`
View plot_into_pdf.py
#!/usr/bin/env python
# Reference:
# [1] http://matplotlib.org/examples/pylab_examples/multipage_pdf.html
# This should be executed before other matplotlib imports
import matplotlib
matplotlib.use('Agg')
import datetime
@leoncamel
leoncamel / gist:dfc0492777bc2db97739
Created Jul 14, 2014
Docker build by docker-py
View gist:dfc0492777bc2db97739
import docker
c = docker.Client(base_url="http://localhost:port", version="1.11")
print(c.version())
for i in c.build(fileobj=open("file.tar"), stream=True, custom_context=True):
print(i)
You can’t perform that action at this time.