Skip to content

Instantly share code, notes, and snippets.

View gorork's full-sized avatar
🏠
Working from home

gorork

🏠
Working from home
View GitHub Profile
@gorork
gorork / gist:8f455475c808198ab2b7
Created October 18, 2014 17:46
Basic logic of script tag
<body>
<h1>Day 10</h1>
<h2><a href="">Script tag logic example</a></h2>
<script>
alert('This is JavaScript alert. Look around your screen and note that there is no image right now.');
</script>
<img src="http://js.ework.me/code/d10-script-tag/bateaumatineeFA.jpg">

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

@gorork
gorork / gist:b18c07205cf862291a64
Last active August 29, 2015 14:10
P2: JavaScript Challenge #1
var getRelationship = function(x, y) {
// If both arguments are numbers
if ( !isNaN(x) && !isNaN(y) ) {
if ( x == y ) { // if they are equal, return '='
return '=';
} else { // if not, return comparison operator
return x < y ? '<' : '>';
@gorork
gorork / gist:fccd1222969f70b2b9e2
Last active August 29, 2015 14:10
P2: JavaScript Challenge #2
var moonWalkers = [
"Neil Armstrong",
"Buzz Aldrin",
"Pete Conrad",
"Alan Bean",
"Alan Shepard",
"Edgar Mitchell",
"David Scott",
"James Irwin",
"John Young",
@gorork
gorork / gist:92de3a4316c7c00307a5
Last active August 29, 2015 14:11
Gulpfile to compless LESS to CSS using Autoprefixer
// 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
gorork / gist:6f14b59830193eba18cc
Created December 20, 2014 02:36
Basic package.json
{
"name": "App Name",
"version": "0.0.1",
"homepage": "http://myapp.com",
"repository": {
"type": "git",
"url": "https://github.com/app"
},
"author": {
"name": "Nadi",
{
"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"]
},
@gorork
gorork / gist:149b62aeadc7a43d8233
Last active August 29, 2015 14:16
User-friendly validation AngularJS directive
<!--
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>
@gorork
gorork / Gruntfile.js
Last active August 29, 2015 14:21 — forked from jshawl/Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options:{
style:'compressed'
},
files: {
'css/style.css' : 'scss/style.scss'

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