Skip to content

Instantly share code, notes, and snippets.

412038: A. Lawrence Foster,A. Foster
401531: Aaron Bliss
401856: Aaron Brown
402077: Aaron Burr
402697: Aaron Cochrane
402968: Aaron Cragin
404210: Aaron Ford
404891: Aaron Hackley
405068: Aaron Harding
405086: Aaron Harlan
@tanepiper
tanepiper / twitter_oauth_getter.js
Created September 11, 2010 16:14
A small command line nodejs script for doing Twitter OAuth.
#!/usr/bin/env node
var argv = require('optimist')
.usage('Usage: --key=[consumer key] -secret=[consumer secret]')
.demand(['key', 'secret'])
.argv
;
var OAuth = require('oauth').OAuth;
var Step = require('step');
@jeffkreeftmeijer
jeffkreeftmeijer / bassie.png
Created April 11, 2011 12:01
Colored image blob detection
bassie.png
@terrancesnyder
terrancesnyder / regex-japanese.txt
Created November 7, 2011 14:05
Regex for Japanese
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna!
([一-龯])
Regex for matching Hirgana or Katakana
([ぁ-んァ-ン])
Regex for matching Non-Hirgana or Non-Katakana
([^ぁ-んァ-ン])
Regex for matching Hirgana or Katakana or basic punctuation (、。’)
@dennisvennink
dennisvennink / gist:1359808
Created November 12, 2011 00:46
Better JavaScript code folding in TextMate.

For some strange reason, JavaScript code folding in TextMate is limited to functions; leaving out JSON, simple statements delimited by brackets, and arrays.

In order to change this behaviour, open up the Bundle Editor (Bundles → Bundle Editor → Show Bundle Editor). From the dropdown menu in the top left corner select 'Languages', expand 'JavaScript' (click the triangle) and choose the JavaScript Language Grammar (the item with the L next to it). Find 'foldingStartMarker' and 'foldingStopMarker' in the list on the right and replace their values with:

foldingStartMarker = '\{\s*$|\[\s*$|\(\s*$';

foldingStopMarker = '^\s*}|^\s*]|^\s*)';

@grahamc
grahamc / call.php
Created December 6, 2011 15:45
Robocall a whole bunch of people from PayPal about this Regretsy disaster.
<?php
// Note: CA state law says no robocalls before 9AM, so wait until 12PM EST.
$sid = 'Your SID';
$token = 'Your Token';
$telephoneNumber = 'Your Telephone Number, the one that Twilio gives you.';
$client = new Services_Twilio($sid, $token);
@leedavis81
leedavis81 / delete-core.sh
Created October 11, 2012 16:57
Delete a solr core
#!/bin/bash
clear
echo "*************************************************************************"
echo "*************************************************************************"
echo
echo " You are about to *permanently* delete a core!"
echo " There is no going back"
echo
echo "*************************************************************************"
@korof
korof / gist:8675597
Created January 28, 2014 20:25
jQuery: Sort a list alphabetically
$(function() {
$.fn.sortList = function() {
var mylist = $(this);
var listitems = $('li', mylist).get();
listitems.sort(function(a, b) {
var compA = $(a).text().toUpperCase();
var compB = $(b).text().toUpperCase();
return (compA < compB) ? -1 : 1;
});
$.each(listitems, function(i, itm) {
@nvsofts
nvsofts / stop_twitter_keyboard_shortcuts.user.js
Last active June 8, 2018 20:32
Twitterのキーボードショートカットを無効化する (Stop Twitter Keyboard Shortcuts)
// ==UserScript==
// @name Stop Twitter Keyboard Shortcuts
// @namespace http://www.ns-koubou.com/
// @include http://twitter.com/*
// @include https://twitter.com/*
// @include http://*.twitter.com/*
// @include https://*.twitter.com/*
// @run-at document-start
// @version 3
// @grant none
@HsiaTsing
HsiaTsing / ply2obj.py
Created October 30, 2014 02:47
This code use the Blender Python API to batch convert 3D model file with ''ply'' format to ''obj'' format. It is only tested on Blender 2.64.
import os
import bpy
# put the location to the folder where the plys are located here in this fashion
path_to_obj_dir = os.path.join('D:\\', 'Workspace\\Data\\scapecomp')
# get list of all files in directory
file_list = sorted(os.listdir(path_to_obj_dir))
# get a list of files ending in 'ply'