Skip to content

Instantly share code, notes, and snippets.

View jxson's full-sized avatar

Jason Campbell jxson

View GitHub Profile
@ryanblock
ryanblock / @ryan tweetbot regex.md
Created August 29, 2012 02:27
How Tweetbot and regex made my Twitter replies usable again (filed under: #wrongryan)

How Tweetbot and regex made my Twitter replies usable again

As it turns out, most normal humans are incapable of learning to use Twitter @ replies. And in case you don't follow me on Twitter: yes, my handle (@ryan) gets a lot of erroneous mentions. (The most amusing, random ones I've even taken to retweeting under the #wrongryan hashtag.)

Then Tweetbot -- and its ability to use regex as Twitter filters -- came along. Here's how the Tapbots guys and some regular expressions single-handedly made my Twitter replies usable again.

Notes and caveats

  • I'm not a regex expert. Far from it. I suck at regex, actually. If you have suggestions for improvements, please leave them below!
  • Some regex may look a little sloppy, but in actuality was written because TweetBot for Mac's regex filter support is very early, and things like repeats (expression{3,}) are buggy. So everything below should work without crashing Tweetbot for iPhone, iPad, and Mac.
  • Obvious, but not everyone should make use of every filter b
@AndreasMadsen
AndreasMadsen / WhatIHaveDone.md
Last active February 13, 2022 16:15
Playing with smartos
@dshaw
dshaw / RedisConf2012.md
Created October 29, 2012 16:59
Redis Conf 2012 Talks
@TooTallNate
TooTallNate / node_pointer.h
Last active April 7, 2016 02:03
C helper functions for wrapping and unwrapping Node Buffer instances as "pointers"
/*
* Helper functions for treating node Buffer instances as C "pointers".
*/
#include "v8.h"
#include "node_buffer.h"
/*
* Called when the "pointer" is garbage collected.
@max-mapper
max-mapper / helloworld.js
Created November 27, 2012 06:55
droneduino
var serialport = require('node-serialport')
var sp = new serialport.SerialPort("/dev/ttyO3", {
parser: serialport.parsers.raw,
baud: 9600
})
sp.on('data', function(chunk) {
console.log(chunk.toString('hex'), chunk.toString(), chunk)
})
@joaoneto
joaoneto / login.test.js
Created March 13, 2013 13:49
Login session test with mocha
var request = require('supertest'),
should = require('should'),
app = require('../server');
var Cookies;
describe('Functional Test <Sessions>:', function () {
it('should create user session for valid user', function (done) {
request(app)
.post('/v1/sessions')
@mattsacks
mattsacks / preventHistorySwipe.js
Created May 22, 2013 22:46
Prevent back/forward gestures when scrolling an element left/right on OS X
// prevent back/forward gestures when scrolling an element left/right on OS X
var preventHistorySwipe = function(element) {
// not even on the right platform bro
if (navigator.userAgent.indexOf('Macintosh') === -1) return;
element.addEventListener('mousewheel', function(e) {
var x = e.wheelDeltaX;
// scrolling up or down? then i don't give a shit
if (x === 0) return;

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@shovon
shovon / README.md
Last active April 18, 2019 08:37
An install script for LLVM and Clang v3.2.

Installing LLVM and Clang v3.2 on OS X

I'm assuming you need this version for Emscripten.

Don't worry, this script will not override your current installation of LLVM and Clang.

Be sure that you have:

  • read this README file
  • read this README file

Recipe for customizing a SmartoOS image and cloning it

1. Create base image

1.1. Download and install the base image:

[root@00-0c-29-aa-24-ba ~]# imgadm list
UUID                                  NAME             VERSION  OS       PUBLISHED
9eac5c0c-a941-11e2-a7dc-57a6b041988f  base64           13.1.0   smartos  2013-04-26T15:17:57Z