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
/* | |
@fliptopbox | |
LZW Compression/Decompression for Strings | |
Implementation of LZW algorithms from: | |
http://rosettacode.org/wiki/LZW_compression#JavaScript | |
Usage: | |
var a = 'a very very long string to be squashed'; | |
var b = a.compress(); // 'a veryāăąlong striċ to bečquashed' |
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
/** | |
* Convert Excel file to Sheets | |
* @param {Blob} excelFile The Excel file blob data; Required | |
* @param {String} filename File name on uploading drive; Required | |
* @param {Array} arrParents Array of folder ids to put converted file in; Optional, will default to Drive root folder | |
* @return {Spreadsheet} Converted Google Spreadsheet instance | |
**/ | |
function convertExcel2Sheets(excelFile, filename, arrParents) { | |
var parents = arrParents || []; // check if optional arrParents argument was provided, default to empty array if not |
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
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository | |
$ git ls-files | xargs wc -l |
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 SweetAlert before this script | |
http://t4t5.github.io/sweetalert | |
*/ | |
function alert(message, callback) | |
{ | |
callback = callback || function(){} | |
var options = | |
{ |
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/python | |
from OpenSSL import crypto | |
import os | |
import sys | |
import datetime | |
import whois | |
#Variables | |
TYPE_RSA = crypto.TYPE_RSA | |
TYPE_DSA = crypto.TYPE_DSA |
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 | |
from objc_util import * | |
ObjCClass('NSBundle').bundleWithPath_('/System/Library/Frameworks/LocalAuthentication.framework').load() | |
context = ObjCClass('LAContext').alloc().init() | |
policy = 1 #put 1 if you want to auth with password, 2 with passcode | |
reason = 'We need you fingerprint to ste...ehm... to log you in' | |
def funct(_cmd,success,error): | |
if success: |
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 sys,os | |
import curses | |
def draw_menu(stdscr): | |
k = 0 | |
cursor_x = 0 | |
cursor_y = 0 | |
# Clear and refresh the screen for a blank canvas | |
stdscr.clear() |
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
[ | |
{ | |
"timezones": [ | |
"America/Aruba" | |
], | |
"latlng": [ | |
12.5, | |
-69.96666666 | |
], | |
"name": "Aruba", |
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 | |
import pyaudio | |
import socket | |
import sys | |
FORMAT = pyaudio.paInt16 | |
CHANNELS = 1 | |
RATE = 44100 | |
CHUNK = 4096 |
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
http://invisible-island.net/xterm/ | |
XTerm Control Sequences | |
Edward Moy | |
University of California, Berkeley | |
Revised by |
OlderNewer