Skip to content

Instantly share code, notes, and snippets.

View codekipple's full-sized avatar

codekipple

View GitHub Profile
/* ------------------------------------------
PURE CSS SPEECH BUBBLES
by Nicolas Gallagher
- http://nicolasgallagher.com/pure-css-speech-bubbles/
http://nicolasgallagher.com
http://twitter.com/necolas
Created: 02 March 2010
Version: 1.2 (03 March 2011)
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
$(document).on('mouseup touchend', function(e) {
$('.my-elem').each(function() {
if($(this).has(e.target).length === 0) {
// hide this element?
}
});
});
@codekipple
codekipple / sass.js
Created August 19, 2014 14:03
programatically building a grunt tasks options
module.exports = function(grunt) {
var pkg = grunt.file.readJSON('package.json');
var config = {
options: {
includePaths: [
'<%=wpThemeDir%>/<%= wpParentThemeDir %>/sass/partials/'
]
},
@codekipple
codekipple / gist:ffbce4c9e6fa13379fc9
Created August 22, 2014 08:12
github rate limit
Authenticate with GitHub to increase your rate limit and allow you to pull from private repositories. To do that, add the following entry to your ~/.netrc file:
machine api.github.com
login <username>
password <token>
You can quickly create a new GitHub token here https://github.com/settings/tokens/new.
@codekipple
codekipple / gist:a63929d5149394092f5c
Created September 11, 2014 14:56
Hack for targeting firefox
@-moz-document url-prefix() {
select {
height: auto;
}
}
http://stackoverflow.com/questions/3123063/what-does-moz-document-url-prefix-do/3123073#3123073
#html5
#whatwg
#gruntjs
#yeoman
##javascript
#jquery
#angularjs
#requirejs
#node.js
#css
@codekipple
codekipple / gist:f0bb09924c07b97e5c18
Created October 24, 2014 12:01
Medium fade on scroll effect
/*
dom nodes
*/
var $btn;
$(document).ready(function () {
$btn = $('.js-btn');
fadeFromView({
element: $btn,
$(document).mouseup(function (e)
{
var container = $("YOUR CONTAINER SELECTOR");
if (!container.is(e.target) // if the target of the click isn't the container...
&& container.has(e.target).length === 0) // ... nor a descendant of the container
{
container.hide();
}
});
@codekipple
codekipple / phaser.txt
Last active August 29, 2015 14:10
phaser game ideas
Football game like swing copters, player dodges tackles as they dribble. Going up the screen.
Use super hexagon style input, hold left to dribble left, hold right to dribble right.
Opponents come flying in trying to tackle you.
At the end the keeper comes flying out and you have to round them.
Make the player the goalie, you have no teammates and have to dribble all the way through the 11 opponents.