Skip to content

Instantly share code, notes, and snippets.

View ajmalafif's full-sized avatar
💻

Ajmal Afif ajmalafif

💻
View GitHub Profile
@ajmalafif
ajmalafif / publish.sh
Created February 9, 2014 16:47 — forked from edrex/publish.sh
#!/bin/sh
# Be sure to set the index and 404 docs to "index" and "404" respectively in your bucket settings
# replace with your compile command
harp compile ./ ./out
# removes the html extension
for f in `ls out/*.html out/**/*.html`; do mv $f "${f%%.*}"; done
// Wrapper for Harp web server, to include JS concat/compile step. Put your stuff
// in /harp subdirectory, npm install your dependencies, run, enjoy.
// Live updating of the concatenated JS file left as an exercise for the reader :)
var fs = require('fs');
var path = require('path');
var harp = require('harp');
var UglifyJS = require('uglify-js');
var files = [];
files.push(__dirname + '/harp/js/file0.js');
@ajmalafif
ajmalafif / til.md
Last active August 29, 2015 13:56
TIL — Rails Development
$ git add --all

to include delete files.

$ git commit
function archiveOld() {
var threads = GmailApp.search('in:inbox -is:starred older_than:7d');
for (var thread in threads) {
GmailApp.moveThreadToArchive(threads[thread]);
}
}
archiveOld();
deployment:
staging:
branch: master
heroku:
appname: supahands-staging
@ajmalafif
ajmalafif / gist:11114821
Created April 20, 2014 14:00
[sublime text 2] — shortcut
[
{ "keys": ["super+shift+;"], "command": "reindent" , "args": {"single_line": false}},
]
@ajmalafif
ajmalafif / gist:11204482
Created April 23, 2014 06:21
Supahands — post mortem
@ajmalafif
ajmalafif / todo.md
Created May 24, 2014 04:15
[rails] — starter template

Rails template

Frontend
  • SASS & Slim
Backend
<div>
<label for="sort-by">Sort by</label>
<select id="sort-by">
<option value="manual">Featured</option>
<option value="price-ascending">Price: Low to High</option>
<option value="price-descending">Price: High to Low</option>
<option value="title-ascending">A-Z</option>
<option value="title-descending">Z-A</option>
<option value="created-ascending">Oldest to Newest</option>
<option value="created-descending">Newest to Oldest</option>