Skip to content

Instantly share code, notes, and snippets.

View lewismcarey's full-sized avatar

Lewis Carey lewismcarey

  • ThirtyThree
  • London, UK
View GitHub Profile
@jtangelder
jtangelder / inview.js
Last active August 29, 2015 13:59
inview.js
/**
* triggers a callback when an element gets into the viewport
* uses a little bit of jQuery. elements auto receive the class `inview`
*
* the threshold parameter is on scale from 0 to 1 of the height.
* 0 means it triggers directly, 1 means it must be full visible
*
* @example
* // images needs to be 50% in view
* inview.register("img", .5, function(item, inview_state) {
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active July 2, 2024 00:02
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@cabgfx
cabgfx / wpsetup.sh
Created December 10, 2012 15:03
wpsetup
#!/bin/sh
#
# Instructions:
#
# First, create the directory where you want to install WordPress.
#
# Then, `cd` into this newly created directory
#
# `wpsetup` and watch magic unfold before you.
@trey
trey / happy_git_on_osx.md
Last active February 18, 2024 10:46
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@gre
gre / easing.js
Last active June 27, 2024 15:37
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {