Skip to content

Instantly share code, notes, and snippets.

View NuckChorris's full-sized avatar

Emma Lejeck NuckChorris

View GitHub Profile
@NuckChorris
NuckChorris / yardoc_cheatsheet.md
Last active September 17, 2017 04:13 — forked from chetan/yardoc_cheatsheet.md
YARD cheatsheet
@NuckChorris
NuckChorris / nginx.conf
Last active September 19, 2016 18:10 — forked from anonymous/nginx.conf
server {
listen 80;
# Proxy settings
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded_For $proxy_add_x_forwarded_for;
location /api/ {
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)
@NuckChorris
NuckChorris / array.js
Last active February 12, 2018 19:47 — forked from pixelhandler/transforms.js
In Ember-CLI, transforms are located in app/transforms/name.js
// app/transforms/array.js
import Ember from 'ember';
import DS from 'ember-data';
export default DS.Transform.extend({
deserialize: function(value) {
if (Ember.isArray(value)) {
return Ember.A(value);
} else {
return Ember.A();

Here's how it's going to look like from the end user perspective:

1 hour before my PRO membership ends, if I am on a recurring plan Hummingbird will try to charge my credit card. If it succeeds everything is good. If it fails my subscription will run out and Hummingbird will try to charge my credit card again tomorrow, 3 days from now and 5 days from now. I will receive an email from Hummingbird if the charge is successful, and a different email every time charging my card fails.

CREATE TABLE files
(
id integer unsigned not null auto_increment,
hash_sha1 binary(160),
filename varchar(255),
size integer unsigned,
mime varchar(255),
unique index index_files_by_id (id),
index index_files_by_sha1 (hash_sha1),
@NuckChorris
NuckChorris / .Xresources
Last active December 17, 2015 02:58 — forked from anonymous/.Xresources
! Enable alpha channel
URxvt.depth: 32
! Set base colors
URxvt.background: [80]#E7E7E7
URxvt.foreground: #30343A
URxvt.cursorColor: #30343A
! Scrollbar at right
URxvt.scrollColor: #d0d0d0
var substring = function(all, start, end) {
if (start >= end) {
console.log(all[start]);
} else {
return all[start] + substring(all, start + 1, end);
}
};
console.log(substring("lorem ipsum dolor", 6, 10));
//app.js
var express = require('express@2.2.2'),
connect = require('connect@1.3.0'),
...
//packages json
"dependencies": {
"express": "2.2.2"
exports.flex_get = function(key, secret, path) {
return function(req, res, next) {
var apisig = crypto.createHash('md5').update(secret + 'ApiKey' + key + 'ServicePath/v1' + path + 'AuthToken' + req.flex_auth_token).digest('hex');
var options = {
host: 'api.website.com',
port: 443,
path: '/v1' + path + '?AuthToken=' + req.flex_auth_token + '&ApiSig=' + apisig,
method: 'GET'
};
var request = https.request(options, function(response) {