Skip to content

Instantly share code, notes, and snippets.

Working from home


Working from home
View GitHub Profile
gorork / subdomain_for_every_user.js
Created Nov 24, 2016
How to reate a sub domain for each user
View subdomain_for_every_user.js
* dynamic A record
* eg. * points to
* then in your router
* source:
// get your dynamic subdomain
gorork / dribbble-profile-usage.html
Created Sep 21, 2015
Dribbble Profile widget usage example
View dribbble-profile-usage.html
<script src="//" data-dribbble-id="rork" async></script>
View gist:b979efefcc61a42f23dc
open -a Google\ Chrome\ Canary --args --disable-web-security
View Contract Killer

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

View Gruntfile.js
module.exports = function(grunt) {
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
files: {
'css/style.css' : 'scss/style.scss'
gorork / gist:149b62aeadc7a43d8233
Last active Aug 29, 2015
User-friendly validation AngularJS directive
View gist:149b62aeadc7a43d8233
AngularJS directive
type: AE
1. pass a field name (e.g. "formName.fieldName") into the "messages-for" attribute;
2. pass a scope expression that returns "true" when users tries to submit the given form
<!-- Validate Messages directive starts -->
<div validate-messages messages-for="siteForm.siteName" submitted="submitted"></div>
View gist:5cc93ce4b05d12187643
"countries": [
"country": "Afghanistan",
"states": ["Badakhshan", "Badghis", "Baghlan", "Balkh", "Bamian", "Daykondi", "Farah", "Faryab", "Ghazni", "Ghowr", "Helmand", "Herat", "Jowzjan", "Kabul", "Kandahar", "Kapisa", "Khost", "Konar", "Kondoz", "Laghman", "Lowgar", "Nangarhar", "Nimruz", "Nurestan", "Oruzgan", "Paktia", "Paktika", "Panjshir", "Parvan", "Samangan", "Sar-e Pol", "Takhar", "Vardak", "Zabol"]
"country": "Albania",
"states": ["Berat", "Dibres", "Durres", "Elbasan", "Fier", "Gjirokastre", "Korce", "Kukes", "Lezhe", "Shkoder", "Tirane", "Vlore"]
View gist:6f14b59830193eba18cc
"name": "App Name",
"version": "0.0.1",
"homepage": "",
"repository": {
"type": "git",
"url": ""
"author": {
"name": "Nadi",
gorork / gist:92de3a4316c7c00307a5
Last active Aug 29, 2015
Gulpfile to compless LESS to CSS using Autoprefixer
View gist:92de3a4316c7c00307a5
// Include Gulp and all required plugins
var gulp = require('gulp');
var less = require('gulp-less');
var autoprefixer = require('gulp-autoprefixer');
var minifyCSS = require('gulp-minify-css');
var gutil = require('gulp-util');
var sourcePath = 'src/custom';
var targetPath = 'assets/css';
gorork / gist:cc73bc9a7d118545e9df
Created Dec 7, 2014
P2: JavaScript Challenge #3
View gist:cc73bc9a7d118545e9df
// Iterate through the localizedRuleNames in ruleResults and
// return an array of their strings.
function ruleList(results) {
var ruleResults = results.formattedResults.ruleResults;
var localizedRuleNamesArray = [];
for (var key in ruleResults) {
// Iterate through object's own properties only