🚴♂️
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
var startY = 0; | |
var startX = 0; | |
document.addEventListener("touchstart", function (event) { | |
alert(11); | |
parent.window.scrollTo(0, 1); | |
startY = event.targetTouches[0].pageY; | |
startX = event.targetTouches[0].pageX; | |
}); | |
document.addEventListener("touchmove", function (event) { | |
event.preventDefault(); |
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
<div id="scroller" style="width: 50%; overflow: auto;"> | |
<iframe height="100%" id="iframe" scrolling="no" width="100%" id="iframe" src="responses.html" /> | |
</div> |
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 -x | |
# This should be your "script/ci" checked into version control, and then wired as your sole build step in Jenkins. | |
# | |
# Simplifying Assumptions: | |
# | |
# * You build all branches | |
# * You want to deploy all branches. | |
# * You wired up an SSH key to your CI server appropriately so it can talk to your deployment target(s) via Cap |
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
# Some good references are: | |
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x | |
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/ | |
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392 | |
#1. Install PostgreSQL postgis and postgres | |
brew install postgis | |
initdb /usr/local/var/postgres | |
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start |
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
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
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/sh | |
# | |
# Startup script for the Jenkins Continuous Integration server for Amazon EC2 Linux | |
# (via jar execution) | |
# | |
# chkconfig: - 85 15 | |
# description: Jenkins Continuous Integration Server | |
# processname: jenkins | |
# pidfile: /var/run/jenkins.pid |
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
/***************** POSTAL CODE *****************/ | |
// cannot start with a zero and must contain 5 digits. | |
let postalCode = "12345"; | |
let regexPostalCode = new RegExp("^[1-9][0-9]{4}$"); | |
let postalCodeMathces = postalcode.match(regexPostalCode); | |
console.log('POSTAL CODE MATCHES:', postalCodeMathces !== null); | |
/***************** PERSONAL NUMBER *****************/ | |
// can only start with one or two | |
// second character can only be a nine or zero |
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
import { fork } from 'redux-saga'; | |
import fetchEntitySaga from './fetchEntitySaga'; | |
export default prefetch( | |
({ getState }) => { | |
if (needsFetching(getState())) { | |
return fork(fetchEntitySaga, getState, ...args); | |
} | |
} | |
)(Component); |
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
# Mirror of the instructions available here: | |
# http://www.lowefamily.com.au/2016/06/02/installing-ubiquiti-unifi-controller-5-on-raspberry-pi/ | |
# | |
# These commands CANNOT be run in a script. | |
# They're just for reference. | |
# Install on Raspbian Jessie, or upgrade from Wheezy. | |
# Make sure all packages are upgraded (update && upgrade). |