Skip to content

Instantly share code, notes, and snippets.

DOESNT WORK:
POST /api/session HTTP/1.1
Host: dev.g2m.me:8243
Authorization: Basic Y2l0cml4Og==
Cache-Control: no-cache
Postman-Token: 24a359ae-4725-5106-711c-b6334ddcb729
Content-Type: application/x-www-form-urlencoded
@auchenberg
auchenberg / dependency-list-generator
Created July 28, 2014 12:16
A quick script to generate a JSON blob of dependencies with license info from Bower/NPM.
var fs = require('fs');
var npm = require('npm');
var bower = require('bower');
var Q = require('q');
var npmConfig = JSON.parse(fs.readFileSync('package.json'));
var bowerConfig = JSON.parse(fs.readFileSync('bower.json'));
function gatherNpmInfo(dependencies) {
[alias]
st = status
ci = commit
br = branch
co = checkout
unstage = reset HEAD
uncommit = reset --soft HEAD^
# When doing "git git log" or some such, do not complain about "git" not
# being a valid Git command. This happens when copy-pasting examples, for
@auchenberg
auchenberg / SudokuBoardValidator
Last active December 20, 2015 07:49
SudokuBoardValidator
// Problem: http://www.eecis.udel.edu/~breech/contest.inet.fall.07/problems/valid-sudoku.html
function SudokuBoardValidator(data) {
this.data = data;
}
SudokuBoardValidator.prototype = {
isUniq: function (range) {
@auchenberg
auchenberg / gist:6048667
Created July 21, 2013 14:08
Fizz buss in JavaScript
for(i=1; i <= 100; i++) {
if(i % 3 === 0 && i % 5 === 0) {
console.log('FizzBuzz');
} else if(i % 3 === 0) {
console.log('Fizz');
} else if (i % 5 === 0) {
console.log('Buzz');
} else {
console.log(i);
}
@auchenberg
auchenberg / gist:5916408
Created July 3, 2013 08:41
Podio alisas
# Podio
alias podio='cd HOME/Podio'
alias podio-rails='podio && cd frontend-rails'
alias podio-php='podio && cd frontend-php'
alias podio-scss='sass --watch /Users/auchenberg/Podio/frontend-rails/app/assets/stylesheets:/Users/auchenberg/Podio/frontend-rails/public/stylesheets/compiled'
alias podio-shared=' podio && cd shared-assets'
alias podio-rb='podio-rails && cd vendor/podio && git pull && podio-rails'
# Rails
alias rails-debug='VERBOSE_API=1 LIVERELOAD=1 rails server thin --debugger'
"assetCount.Css": 7,
"assetCount.Gif": 13,
"assetCount.Html": 3,
"assetCount.Ico": 1,
"assetCount.JavaScript": 8,
"assetCount.Jpeg": 4,
"assetCount.Png": 177,
"assetCount.application/octet-stream": 1,
"assetCount.application/vnd.ms-fontobject": 2,
@auchenberg
auchenberg / gist:3081969
Created July 10, 2012 08:11
Podio.js search example
// Initialize and specify client id and secret
var Podio = require('podiojs');
var podio = new Podio();
podio.client.client_id = 'sample';
podio.client.client_secret = 'gCb4aq1RAWvPgHqxTwiDtvNGa59S7i5FvGHFZeq4rnr9YUxHVqwdpz91SJlwsppH';
podio.on('error', function(request, response, body) {
console.log('There was a problem with a request to ' + request.path+'. Error was "'+body.error_description+'" ('+body.error+')');
});
@auchenberg
auchenberg / gist:3076540
Created July 9, 2012 13:22
Podio global search
# encoding: UTF-8
require 'podio'
Podio.client = Podio::Client.new({:api_key => 'app key', :api_secret => 'app secret'})
Podio.client.authenticate_with_credentials('user email', 'user password')
results = Podio::Search.globally('70-cd-60-f8-41-a2')
results_item = Podio::Search.globall('auchenberg')
html {
}
.image-block {
vertical-align: top;
margin: 0px;