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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <assert.h> | |
#include <unistd.h> | |
#include <stdbool.h> | |
/** | |
* @berief Format text table | |
* @author informationsea |
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
function countlines() { | |
local basedir=$1 | |
local currentlines='0' | |
local thislines | |
shift 1 | |
while [ $1 ] ;do | |
thislines=`find "$basedir" -type f -name "*.$1" -print0 | xargs -0 cat | wc -l` | |
currentlines=$(($thislines + $currentlines)) | |
shift 1 | |
done |
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
def suggest_type_from_str(string): | |
""" | |
Arguments: | |
- `string`: | |
""" | |
try: | |
return int(string) | |
except: |
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
#!/usr/bin/env python2.7 | |
__author__ = 'informationsea' | |
__copyright__ = 'Copyright (C) 2012 informationsea All Rights Reserved.' | |
import bz2 | |
import gzip | |
import struct | |
class RandomZip(object): |
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
#!/usr/bin/env python | |
""" | |
Read indexed tab-delimited file | |
""" | |
__author__ = '@informationsea' | |
__copyright__ = 'Copyright (C) 2011 @informationsea All Rights Reserved.' | |
import sys |
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
# Hey Emacs, this is a -*- makefile -*- | |
# Copyright (C) 2013 Y.Okamura | |
# https://gist.github.com/2343121 | |
# MIT License | |
# Target Executable file | |
TARGET = exefile | |
# C source code | |
SRC = |
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
=== modified file 'lisp/term/ns-win.el' | |
--- lisp/term/ns-win.el 2012-02-25 10:04:30 +0000 | |
+++ lisp/term/ns-win.el 2012-04-17 14:04:58 +0000 | |
@@ -533,6 +533,12 @@ | |
(interactive) | |
(ns-hide-others)) | |
+(declare-function ns-fullscreen-toggle-cocoa "nsfns.m" ()) | |
+ | |
+(defun ns-fullscreen-toggle () |
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
#!/usr/bin/env python2.7 | |
import argparse | |
import pyPdf | |
import os | |
import os.path | |
def _main(): | |
parser = argparse.ArgumentParser(description='rename PDF files') | |
parser.add_argument('pdf', nargs='+', type=argparse.FileType('rb')) |
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
-- Put at "~/Library/Scripts/iChat" | |
on showgrowl(theNotify, theImage, theTitle, theMessage) | |
tell application "Growl" | |
-- Make a list of all the notification types | |
-- that this script will ever send: | |
set the allNotificationsList to ¬ | |
{"Login", "Logout", "Present", "Text Message", "Invitation"} | |
-- Make a list of the notifications |
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
=== modified file 'lisp/term/ns-win.el' | |
--- lisp/term/ns-win.el 2012-02-25 10:04:30 +0000 | |
+++ lisp/term/ns-win.el 2012-05-17 06:21:33 +0000 | |
@@ -533,6 +533,12 @@ | |
(interactive) | |
(ns-hide-others)) | |
+(declare-function ns-fullscreen-toggle-cocoa "nsfns.m" ()) | |
+ | |
+(defun ns-fullscreen-toggle () |
OlderNewer