$ npm install -g http-server
$ http-server -p 8000 -a foo.bar.comWould serve PWD at http://foo.bar.com/
| /* Gmail style scrollbar */ | |
| ::-webkit-scrollbar { | |
| width: 12px | |
| } | |
| ::-webkit-scrollbar-thumb { | |
| border-width: 1px 1px 1px 2px | |
| } | |
| ::-webkit-scrollbar-track { | |
| border-width: 0 | |
| } |
| <!doctype html> | |
| <!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
| <html> | |
| <head> | |
| <title>iOS 8 web app</title> | |
| <!-- CONFIGURATION --> |
| angular.module('bDatepicker', []). | |
| directive('bDatepicker', function(){ | |
| return { | |
| require: '?ngModel', | |
| restrict: 'A', | |
| link: function($scope, element, attrs, controller) { | |
| var updateModel; | |
| updateModel = function(ev) { | |
| element.datepicker('hide'); | |
| element.blur(); |
| DROP TABLE IF EXISTS time_dimension; | |
| CREATE TABLE time_dimension ( | |
| id INTEGER PRIMARY KEY, -- year*10000+month*100+day | |
| db_date DATE NOT NULL, | |
| year INTEGER NOT NULL, | |
| month INTEGER NOT NULL, -- 1 to 12 | |
| day INTEGER NOT NULL, -- 1 to 31 | |
| quarter INTEGER NOT NULL, -- 1 to 4 | |
| week INTEGER NOT NULL, -- 1 to 52/53 | |
| day_name VARCHAR(9) NOT NULL, -- 'Monday', 'Tuesday'... |
$ npm install -g http-server
$ http-server -p 8000 -a foo.bar.comWould serve PWD at http://foo.bar.com/
Reference: RFC 2616 - HTTP Status Code Definitions
| // Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
| // See also: http://www.paulund.co.uk/change-url-of-git-repository | |
| $ cd $HOME/Code/repo-directory | |
| $ git remote rename origin bitbucket | |
| $ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
| $ git push origin master | |
| $ git remote rm bitbucket |
| const arr1 = [1,2,3] | |
| const arr2 = [4,5,6] | |
| const arr3 = [...arr1, ...arr2] //arr3 ==> [1,2,3,4,5,6] |
| #!/bin/bash | |
| # Anh Nguyen <[email protected]> | |
| # 2016-04-30 | |
| # MIT License | |
| # This script takes in same-size images from a folder and make a crossfade video from the images using ffmpeg. | |
| # Make sure you have ffmpeg installed before running. | |
| # The output command looks something like the below, but for as many images as you have in the folder. |
| function asyncFunc(e) { | |
| return new Promise((resolve, reject) => { | |
| setTimeout(() => resolve(e), e * 1000); | |
| }); | |
| } | |
| const arr = [1, 2, 3]; | |
| let final = []; | |
| function workMyCollection(arr) { |