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 scrollTopBeforeIframe = $window.scrollTop(); | |
$window.one('scroll', function(e) { | |
console.log('window scroll event @' + $window.scrollTop() + ', reverting to ' + scrollTopBeforeIframe); | |
$window.scrollTop(scrollTopBeforeIframe); | |
}); |
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 | |
set -e | |
if [[ -z $ANDR_TARGET ]] | |
then | |
ANDR_TARGET="emulator" | |
fi | |
if [[ $ANDR_TARGET = "device" ]] |
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
package com.my.package; | |
static import com.my.package.Symbols.*; | |
class MyClass { | |
// Symbol constants | |
enum Symbols { EXTRA_SOME_KEY } | |
void unpackExtras() { | |
Bundle extras = getIntent().getExtras(); |
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
<!-- Back to top --> | |
<script type="text/javascript"> | |
$("#toTop").click(function (event) { | |
event.preventDefault(); | |
//1 second of animation time | |
//html works for FFX but not Chrome | |
//body works for Chrome but not FFX | |
//This strange selector seems to work universally | |
$("html, body").animate({scrollTop: 0}, 1000); |
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
export EDITOR=vim | |
export PS1="\n\w\n\$ " | |
export TERM=xterm-256color | |
alias gb="git branch" | |
alias gg="git grep" | |
alias gs="git status" | |
alias ga="git add" | |
alias gd="git diff" | |
alias gc="git commit" |
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
alias gpublish="git push --set-upstream origin `git rev-parse --abbrev-ref HEAD`" | |
alias gpullreq="open https://github.com/Readmill/web/pull/new/`git rev-parse --abbrev-ref HEAD`" |