Skip to content

Instantly share code, notes, and snippets.

View jason-engage's full-sized avatar

Jason Shaw jason-engage

  • Raw AI
View GitHub Profile
# Use PHP 5.4
#AddHandler application/x-httpd-php53 .php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/([/ab/]|[/bc/]|/mb/]|[/nb/]|[/nl/]|[/nt/]|[/ns/]|[/nu/]|[/on/]|[/pe/]|[/qc/]|[/sk/]|[/yt/]|[/al/]|[/ak/]|[/az/]|[/ar/]|[/ca/]|[/co/]|[/ct/]|[/de/]|[/fl/]|[/ga/]|[/hi/]|[/id/]|[/il/]|[/in/]|[/ia/]|[/ks/]|[/ky/]|[/la/]|[/me/]|[/md/]|[/ma/]|[/mi/]|[/mn/]|[/ms/]|[/mo/]|[/mt/]|[/ne/]|[/nv/]|[/nh/]|[/nj/]|[/nm/]|[/ny/]|[/nc/]|[/nd/]|[/oh/]|[/ok/]|[/or/]|[/pa/]|[/ri/]|[/sc/]|[/sd/]|[/tn/]|[/tx/]|[/ut/]|[/vt/]|[/va/]|[/wa/]|[/wv/]|[/wi/]|[/wy/]|[/dc/])
RewriteRule ^(ab|bc|mb|nb|nl|nt|ns|nu|on|pe|qc|sk|yt|al|ak|az|ar|ca|co|ct|de|fl|ga|hi|id|il|in|ia|ks|ky|la|me|md|ma|mi|mn|ms|mo|mt|ne|nv|nh|nj|nm|ny|nc|nd|oh|ok|or|pa|ri|sc|sd|tn|tx|ut|vt|va|wa|wv|wi|wy|dc)/(.*)$ states/$1/$2 [L]
jason-engage / gist:56b3df8f294af35cd58d
Created September 15, 2015 18:55
Gulp File for Minifying / Concat / Removing Comments and Console logs of Ionic Project
View gist:56b3df8f294af35cd58d
var gulp = require('gulp');
var gutil = require('gulp-util');
var bower = require('bower');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var compass = require('gulp-compass');
var minifyCss = require('gulp-minify-css');
var rename = require('gulp-rename');
var sh = require('shelljs');
var path = require('path');
jason-engage / gist:e072cc300fd789e8841e
Last active June 8, 2017 15:26
Ionic Register Push Function Example with Payload and ionicPopup for Android and IOS
View gist:e072cc300fd789e8841e
//Here is the curl commands I use to test - make sure you update the CAPSVARS. You can add an item ID Payload or not.
//For example if your app displays items, it can navigate to a specific item.
//If you want to add more state names, instead of only going to specific items:
//add another payload property called 'stateName'
//create a goState() function to accept a stateName as a parameter
//and modify the registerPush() to find the stateName property and pass into your goState().
curl -u YOURAPIKEY: -H "Content-Type: application/json" -H "X-Ionic-Application-Id: APPID" -d '{"tokens":["ANDROIDTOKEN"],"notification":{"alert":"I come from planet Ion.", "android":{"title":"This is a title2", "payload":{"sound":"notification.mp3","itemId":"7TF00hJI78Y"}}}}'
jason-engage / gist:a1fb756f29e14debee4c
Created September 10, 2015 19:53
Console log of IOS using IONIC Deploy + other
View gist:a1fb756f29e14debee4c
[DEBUG] Did open IPv4 listening socket 7
[DEBUG] Did open IPv6 listening socket 8
[INFO] GCDWebServer started on port 12344 and reachable at http://localhost:12344/
2015-09-09 22:10:45.415 Coding[4755:812986] Started http daemon: http://localhost:12344/
2015-09-09 22:10:45.470 Coding[4755:812986] active
2015-09-09 22:10:47.685 Coding[4755:812986] uuid is:
2015-09-09 22:10:47.686 Coding[4755:812986] ignore deploy
2015-09-09 22:10:47.686 Coding[4755:812986] ignore version:
2015-09-09 22:10:47.690 Coding[4755:812986] Ionic Deploy: Init
2015-09-09 22:10:47.701 Coding[4755:812986] Internet Status WIFI
jason-engage / 0_reuse_code.js
Last active August 29, 2015 14:14
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console