Skip to content

Instantly share code, notes, and snippets.

View dashawk's full-sized avatar

Jason Panugaling dashawk

  • Cebu City, Philippines
View GitHub Profile
/* CORS */
const Hapi = require('hapi');
const server = new Hapi();
server.connection({
host: '0.0.0.0',
port: this.config.webservice_port,
routes: {
cors: {
@dashawk
dashawk / youtube-dl-download-pluralsight.md
Created April 25, 2017 14:29 — forked from munim/youtube-dl-download-pluralsight.md
youtube-dl to download pluralsight videos

Download Plural Sight videos

Software required:

youtube-dl

After installation and putting the youtube-dl in PATH

youtube-dl \
@dashawk
dashawk / gist:464ba6b7c214f9d7bbcefa7aad08afaa
Created March 16, 2017 02:07 — forked from Mithrandir0x/gist:3639232
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
@dashawk
dashawk / core.route.js
Last active January 30, 2017 03:50
[FIX] generator-hottowel-html5mode(false)
routerHelper.configureStates(getStates(levels), function () {
var redirects = '/404';
if($state.current.url === '^') {
redirects = '/'; // Or Whatever your homepage is
}
return redirects;
});
@dashawk
dashawk / download_egghead_videos.md
Created December 12, 2016 04:31 — forked from ldong/download_egghead_videos.md
download egghead videos

Download videos from egghead

Go to the egghead website, i.e. Building a React.js App

run

$.each($('h4 a'), function(index, video){
  console.log(video.href);
});
@dashawk
dashawk / center-column.css
Created October 10, 2016 02:37
Twitter Bootstrap Center any column
.center-column {
float: none !important;
margin: 0 auto;
}
.no-padding-left {
padding-left: 0;
}
.no-padding {
padding: 0;
}