This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Run kiosk mode (full screen mode) in Mac | |
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --kiosk http://www.google.com | |
Run kiosk mode (full screen mode) in Windows | |
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --kiosk --kiosk-printing "https://google.com/" | |
https://superuser.com/questions/716426/running-latest-chrome-for-windows-in-kiosk-mode | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Handlebars helper to generate dummy UI. | |
For instance, a 10x10 table with 100 cells: | |
<table> | |
{{#repeat 10}} | |
<tr> | |
{{#repeat 10}} | |
<td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/ | |
# | |
ARGS=2 | |
E_BADARGS=99 | |
if [ $# -ne $ARGS ] # correct number of arguments to the script; | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#wp db migration query | |
UPDATE wp_options SET option_value = replace(option_value, 'http://www.livesite.com', 'http://localhost/mysite') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.livesite.com', 'http://localhost/mysite'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://www.livesite.com', 'http://localhost/mysite'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I mean, seriously, localStorage is supported even by your mum. How about instead of | |
// casing the feature out, you give users in-memory (stale) storage instead? | |
// If they close your application, they deserve to lose data anyway. | |
// if (!('localStorage' in window)) { | |
if (!Modernizr.localstorage) { | |
window.localStorage = { | |
_data : {}, | |
setItem : function(id, val) { return this._data[id] = String(val); }, | |
getItem : function(id) { return this._data.hasOwnProperty(id) ? this._data[id] : undefined; }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[core] | |
autocrlf = true | |
symlinks = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "", | |
"version": "0.1.0", | |
"dependencies": { | |
"grunt": "^1.0.1" | |
}, | |
"devDependencies": { | |
"compass-mixins": "^0.12.10", | |
"grunt-contrib-uglify": "^3.0.1", | |
"grunt-contrib-watch": "^1.0.0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = function (grunt) { | |
// load all grunt tasks | |
require('load-grunt-tasks')(grunt); | |
grunt.initConfig({ | |
sass: { | |
options: { | |
sourceMap: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<!--#include virtual="test.shtml"--> | |
<!--#echo var="DATE_LOCAL" --> | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// easing function required external library like jQuery.UI | |
// without 'html', IE will not work | |
function scrollToElement($ele, duration) { | |
var duration = duration ? duration : 450, | |
scrollToPos = $ele ? $ele.position().top : $(document).height() - $(window).height(); | |
$( 'html, body').animate({ | |
scrollTop: scrollToPos | |
}, duration, 'easingFunction', function() { | |
// Animation complete. |