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
// Sticky Element on scroll | |
var sticky = $('.selector'); | |
var top = sticky.offset().top - parseFloat(sticky.css('margin-top').replace(/auto/, 0)); | |
$(window).scroll(function (event) { | |
var y = $(this).scrollTop(); | |
y >= top ? sticky.addClass('fixed') : sticky.removeClass('fixed'); | |
}); |
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
find -name '*' -type d -exec chmod 0755 {} \; |
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
find . -type f -exec chmod 0644 {} \; |
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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
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
// Show viewport size | |
document.addEventListener('DOMContentLoaded', function() { | |
document.body.insertAdjacentHTML('afterend', '<div id="viewport-size" style="position:fixed; top:0; right:0; z-index: 9999; padding:0 .5em; color:#333; background:rgba(255,255,255,.75); font: 14px/1.8em Monaco, Inconsolata, Ubuntu Mono, Courier New, monospaced;"></div>'); | |
showViewportSize(); | |
}); | |
window.onresize = function() { showViewportSize(); } | |
function showViewportSize() { | |
var body = document.body, |
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
/* ========================================================================== | |
Section comment block | |
========================================================================== */ | |
/* Sub-section comment block | |
========================================================================== */ | |
/** | |
* Short description using Doxygen-style comment format | |
* |
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
<!doctype html><title>Looping…</title><script>window.history.go(0);</script> |
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
<?php | |
$mysqli = @new mysqli('host', 'user', 'password', 'dabatase'); | |
if ($mysqli->connect_errno) { | |
die('Connect Error: ' . $mysqli->connect_errno); | |
} | |
echo "Connected successfully" | |
?> |
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 | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' | |
green='\033[0;32m' |
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
# Set architecture flags | |
export ARCHFLAGS="-arch x86_64" | |
# Ensure user-installed binaries take precedence | |
export PATH=/usr/local/bin:$PATH | |
export PATH="/usr/local/mysql/bin:$PATH" | |
export PATH="/usr/local/git/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:$PATH" | |
# Load .bashrc if it exists | |
test -f ~/.bashrc && source ~/.bashrc |
OlderNewer