Skip to content

Instantly share code, notes, and snippets.

@weisk
weisk / connecthistoryapi.coffee
Created November 7, 2015 11:23
gulp task connect history api enhanced
gulp.task 'connect', [], -> connect.server
root: ['build']
port: 9000
livereload: true
middleware: (connect, opt) -> [
historyApiFallback = (req, res, next) ->
headers = req.headers
rewriteTarget = '/index.html'
appBaseDir = 'build'
@weisk
weisk / multiple_ssh_setting.md
Last active August 27, 2015 18:00 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@weisk
weisk / arrayzing.md
Last active August 28, 2016 05:23 — forked from ourmaninamsterdam/LICENSE
Arrayzing - The JavaScript array cheatsheet
@weisk
weisk / parallax.coffee
Last active August 29, 2015 14:20
Angular Parallax image & background
angular.module 'directives'
### Usage:
<div
parallax-background
parallax-background-ratio="0.6"
parallax-background-src="assets/image.png"
parallax-background-gradient="linear-gradient(rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.4) 100%)">
</div>
###
@weisk
weisk / smoothscrolling.coffee
Created May 5, 2015 15:06
Smooth Scrolling
app.run ($rootScope, $state, SessionService, $window) ->
$rootScope.$state = $state
$rootScope.logout = -> SessionService.logout true
win = $($window)
scrollTime = 0.3
scrollDistance = 200
win.on 'mousewheel DOMMouseScroll', (evt) ->
evt.preventDefault()