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
/** | |
* dynamic A record | |
* eg. *.domain.com points to domain.com? | |
* then in your router | |
* | |
* source: https://github.com/bmullan91/express-subdomain/issues/26#issuecomment-225441455 | |
*/ | |
// get your dynamic subdomain |
<script src="//nadikun.com/code/dribbble-profile/dp-loader.js" data-dribbble-id="rork" async></script> |
open -a Google\ Chrome\ Canary --args --disable-web-security |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
sass: { | |
dist: { | |
options:{ | |
style:'compressed' | |
}, | |
files: { | |
'css/style.css' : 'scss/style.scss' |
<!-- | |
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> |
{ | |
"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"] | |
}, |
{ | |
"name": "App Name", | |
"version": "0.0.1", | |
"homepage": "http://myapp.com", | |
"repository": { | |
"type": "git", | |
"url": "https://github.com/app" | |
}, | |
"author": { | |
"name": "Nadi", |
// 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'; |
// 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 |