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
@yutsengwei
yutsengwei / Angular5-IntroJs.html
Last active June 14, 2019 10:27
Using pure intro.js in Angular 5 [Note]
# 1 . npm install intro.js --save
# 2. @import '~intro.js/minified/introjs.min.css'; to styles.scss
# 3. add to the componenet which you want to show
//add declaration to the top
const IntroJs = require('/pathTo/node_modules/intro.js');
@keithweaver
keithweaver / setting-up-lamp-ec2.md
Created March 20, 2017 22:48
Setting up a LAMP stack on Amazon Web Services (AWS) EC2

Setting Up EC2

  1. Sign into AWS
  2. Open EC2
  3. Click Instances on Left Side
  4. Click "Launch Instance"
  5. Select "Amazon Linux AMI 2016.09.1 (HVM), SSD Volume Type"
  6. Select Free Tier
  7. Click review and launch
  8. Press Launch
@mhazy
mhazy / codeship-s3-sync.sh
Last active August 29, 2017 14:34
CodeShip deployment script for syncing build to S3 and setting per-file cache settings
# make sure awscli is installed
pip install awscli
# build
grunt build-staging
# Clear staging path on s3
aws s3 rm s3://[BUCKET NAME]/[DIRECTORY] --recursive
# Sync the dist folder
aws s3 sync ./dist s3://[BUCKET NAME]/[DIRECTORY] --acl public-read --cache-control "public, max-age=86400"
# Update index.html to have a 60sec cache
aws s3api copy-object --copy-source [BUCKET NAME]/[FILEPATH] --cache-control "public, max-age=60" --content-type "text/html" --bucket [BUCKET NAME] --key [FILEPATH] --metadata-directive="REPLACE"
@e1024kb
e1024kb / gist:41bf38fdb1a2cb19a781
Created September 27, 2014 13:29
Country - state list in JSON
{
"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"]
},
@staltz
staltz / introrx.md
Last active May 7, 2024 09:38
The introduction to Reactive Programming you've been missing
@toddmotto
toddmotto / gist:6596373
Created September 17, 2013 15:56
Disable Web Security in Chrome Canary to make cross-domain XHR requests (local servers obvs).
open -a Google\ Chrome\ Canary --args --disable-web-security
@jshawl
jshawl / Gruntfile.js
Last active January 18, 2023 13:52
Grunt + Sass + Autoprefixer
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options:{
style:'compressed'
},
files: {
'css/style.css' : 'scss/style.scss'
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@keeguon
keeguon / countries.json
Created April 5, 2012 11:11
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
@yeban
yeban / jekyll.tag-cloud.rb
Created April 3, 2012 07:36
Flexible, logarithmic distribution, tag cloud for Jekyll.
# Copyright (C) 2011 Anurag Priyam - MIT License
module Jekyll
# Jekyll plugin to generate tag clouds.
#
# The plugin defines a `tag_cloud` tag that is rendered by Liquid into a tag
# cloud:
#
# <div class='cloud'>