Skip to content

Instantly share code, notes, and snippets.

View digideskio's full-sized avatar

airbender digideskio

View GitHub Profile
@digideskio
digideskio / bootstrap_fog_softlayer.sh
Last active March 15, 2016 16:43
Bootstrap fog softlayer, ready to use
#!/bin/bash
mkdir foglayer
cd foglayer
cat << EOF > Gemfile
source 'https://rubygems.org'
gem 'fog-softlayer'
EOF
@digideskio
digideskio / xubuntu-hacks.md
Created March 2, 2016 18:59 — forked from apotonick/xubuntu-hacks.md
Xubuntu hacks

Key to turn on laptop screen

I have a two monitor setup, but I like my laptop screen turned off (via Display).

When disconnecting the VGA cable, the screen is blank. I put the following command into ~/hacks/turn_on_laptop_screen.sh.

xrandr --output eDP1 --mode 1366x768
@digideskio
digideskio / evangelism.md
Created March 2, 2016 23:56 — forked from stephenlb/evangelism.md
PubNub Evangelism Program
@digideskio
digideskio / iWantYou
Created March 14, 2016 09:49 — forked from sethbridges/iWantYou
Rival IQ wants You!
Our startup (RivalIQ.com) is looking for a Seattle-based full-stack developer with strong front-end skills and 3+ years of experience.
The person we're looking for is passionate about software, who relishes turning data into insight, and who is excited to work in a small, capable team where everyone has real impact. We highly value great engineering and teamwork (no egos please), and we use hire-by-audition to evaluate potential teammates. Our technology stack includes marionettejs/bootstrap/backbone/node/postgres/heroku.
Most details are pretty standard: full time, cash + equity comp, flexible work locations (we mix office + home).
Contact me if you are interested, or know someone who might be! (sethb@rivaliq.com)
@digideskio
digideskio / img2ascii.js
Created March 15, 2016 22:08 — forked from bojanbjelic/img2ascii.js
convert image to ascii
// taken from http://thecodeplayer.com/walkthrough/cool-ascii-animation-using-an-image-sprite-canvas-and-javascript
//some variables
var r, g, b, gray;
var character, line = "";
//sprite stuff
var sprite = document.getElementById("sprite");
var W = sprite.width;
var H = sprite.height;
@digideskio
digideskio / AuthController.js
Created April 1, 2016 10:55 — forked from theangryangel/AuthController.js
sails (v0.8.82) + passport + passport-local Rough Example. For the love of all that is holy, don't use this in production.
// api/controllers/AuthController.js
var passport = require('passport');
var AuthController = {
login: function (req,res)
{
res.view();
},
@digideskio
digideskio / TestController.js
Created April 1, 2016 10:55 — forked from theangryangel/TestController.js
Abusing sails' policies to use existing express middleware (ie. express-form)
// api/controllers/TestController.js
var TestController = {
// since the policy will have run, we can now use req.form as "normal"
formtest: function(req, res)
{
if (!req.form.isValid)
{
// Handle errors
@digideskio
digideskio / csv_import_magic.js
Created April 5, 2016 13:03 — forked from ianlewis/csv_import_magic.js
A Google Apps Script for importing CSV data into a Google Spreadsheet.
// vim: ft=javascript:
/*jslint sloppy: true, vars: true, white: true, nomen: true, browser: true */
/*global SpreadsheetApp, UiApp, UrlFetchApp, Utilities */
/*
* A script to automate requesting data from an external url that outputs CSV data.
*
* Adapted from the Google Analytics Report Automation (magic) script.
* @author nickski15@gmail.com (Nick Mihailovski)
* @author ianmlewis@gmail.com (Ian Lewis)
*/
@digideskio
digideskio / imagemagick-install-steps
Created April 16, 2016 14:42 — forked from rodleviton/imagemagick-install-steps
Installing Image Magick on Ubuntu 14.04
sudo -i
cd
apt-get install build-essential checkinstall && apt-get build-dep imagemagick -y
wget http://www.imagemagick.org/download/ImageMagick-6.8.7-7.tar.gz
tar xzvf ImageMagick-6.8.9-1.tar.gz
cd ImageMagick-6.8.9-1/
./configure --prefix=/opt/imagemagick-6.8 && make
checkinstall
@digideskio
digideskio / brunch-heroku-deploy.md
Created April 20, 2016 04:09
Build & deploy brunch applications on Heroku.
  1. Add to .gitignore:

    node_modules
    public
    
  2. Add to your app dependencies of package.json: