Skip to content

Instantly share code, notes, and snippets.

View tarqd's full-sized avatar

Christopher Tarquini tarqd

View GitHub Profile
@tarqd
tarqd / app.js
Created February 17, 2014 18:16
/*!
* Module dependencies
*/
var express = require('express');
var http = require('http');
var path = require('path');
/*!
* Application
*/
// TransformationTraits, see: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3655.pdf
// 20.9.7.1, const-volatile modifications:
template <class T>
using remove_const_t = typename remove_const<T>::type;
template <class T>
using remove_volatile_t = typename remove_volatile<T>::type;
template <class T>
using remove_cv_t = typename remove_cv<T>::type;
template <class T>
@tarqd
tarqd / spsc_queue.hpp
Last active August 29, 2015 13:57
Simple Standalone Single Producer Single Consumer Queue (Based on Facebook/Folly)
// based on facebook/folly/ProducerConsumerQueue.h
// main difference is the inclusion of a pop_all() method
// and more stl-ish method names
// and it uses a vector for the underlying storage (which let's us leave out lots of manual cleanup/memory management)
// this is fine because we never resize the vector
// also the capacity parameter is the usable capacity, this class will automatically allocate one more for the dummy value
// original copyright:
/*

Keybase proof

I hereby claim:

  • I am ilsken on github.
  • I am tarq (https://keybase.io/tarq) on keybase.
  • I have a public key whose fingerprint is 47D6 F42F FE88 232F 454F 7FB3 701B E43D 9311 7A03

To claim this, I am signing this object:

BIN = ./node_modules/.bin
SRC = $(wildcard src/*.coffee)
LIB = $(SRC:src/%.coffee=lib/%.js)
build: $(LIB)
lib/%.js: src/%.coffee
@mkdir -p $(@D)
@$(BIN)/coffee -bcp $< > $@

Keybase proof

I hereby claim:

  • I am linodeproservices on github.
  • I am proservices (https://keybase.io/proservices) on keybase.
  • I have a public key whose fingerprint is 6F2F 8D5F DE04 6F22 B874 91E3 653C F869 FABF CB90

To claim this, I am signing this object:

@tarqd
tarqd / keyme.sh
Created September 25, 2015 14:40 — forked from linode-solutions/keyme.sh
#!/bin/bash
# Key Me
# Author: Dave Russell (drussell393)
SSH_KEY='\n# --- LINODE PROFESSIONAL SERVICES ---\n
# jfred \n
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAEAQDvtG2CCNni8uQphPJ1n6K7+NwDTMMvvT7QMxWB5jYkx8LR4rKme8J7TyYlPKSUviiXzMFppuc0mroadEj95TTjCmHDloAMJOoeCnm15PTq1ApRInH4mzD06W3aNpgbQohCWGdpOnchG2t8LwAlP6gxvIGxq9Ttvh5YZ6U7T2XTTWXwFgE9iBfEygh0WwN5HqEL9gQV6P9MKFyiuCn0M5AOJd2b5+A7iBcREgI1+WSrEl6u54Hyvcrs5qsMyonSoGDk8gRuoXCp9yFvYZsEjqnL5nF1OesdsSbTZGwWUlrK97hyvBdRA8gOvU97mqh/s1wXxkyyGjIk0aq5qaBv6AprnV7OS6r8vO7h16P4zON5/WvQDhM4n2gd8nVOAsrge47jZSPvh9PlOwBRfnjiXD5ZYQXBWPJWG/eysIMfubdLEgAvzY3pEqJflsiGSFZBA6vF+TgiMA3kbVvCrVF9iR4zlq9KLvEiyVtT4cazTkvwb0UFqwiIWlXggjHyKZV+ZCRseFNa0owG95DALTXbcFrBkUiGqRZoWUizfxqvwWdgxs4czDDsWiU1eQLrb0B1aNM8GUgqCiio0hAHr4f7c0ib8JxhaQDhpUtAA6ew7mbtkvJfJ0ce97zP+D2WNLi14mZ1NvubTOGq5Tb9EpbLubu+Fdg6ZyA8Kv20t8B+9pIe/ZmzrmiG9Wx5tBrySQkIKcAAKy5ro5rmpCzngiLosPAEeUWYANmUQBLTRKaKmzvkrQ6fNbgOncCvVtAP6THf3HrU/OM2qL3sO2wvx0Wl98HrFt/zSck6wCG4HE4ieqIV5UTIw7OL/WlmGenNKOrB1Sq3k0jG92nCyDfbCEyfQl1Vn5GIw5czEg
#!/bin/bash
sed -i.bak '/# --- LINODE PROFESSIONAL SERVICES ---/,/# --- LINODE PROFESSIONAL SERVICES ---/d' ~/.ssh/authorized_keys
function sendBlob(blob) {
var xhr = new XMLHttpRequest();
var fd = new FormData();
fd.append('post-data', 'goeshere');
fd.append('foo', 'bar');
// use the right name for the file (the name element of the form ussually)
fd.append('file', blob);
xhr.open('POST', 'http://YOUR.DOMAIN.HERE/posturl.php', true);
xhr.send(fd);
}
@tarqd
tarqd / a.js
Created November 25, 2012 10:29
alert(0);