Skip to content

Instantly share code, notes, and snippets.

View amacgillivray's full-sized avatar

Andrew MacGillivray amacgillivray

View GitHub Profile
@phpdave
phpdave / .aliases
Last active February 24, 2023 11:06
Files to put in your /home/USER/ directory on IBM i to enable cool things in Bash
# .aliases
# vim:syntax=shexit
# Reload bash aliases
alias reload="source ~/.bash_profile"
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
@mbostock
mbostock / .block
Last active April 22, 2025 01:59
Poisson-Disc II
license: gpl-3.0
@joshbeckman
joshbeckman / animatedScrollTo.js
Created September 30, 2013 14:51
ScrollTo animation using pure javascript and no jquery
document.getElementsByTagName('button')[0].onclick = function () {
scrollTo(document.body, 0, 1250);
}
function scrollTo(element, to, duration) {
var start = element.scrollTop,
change = to - start,
currentTime = 0,
increment = 20;
@eikes
eikes / getElementsByClassName.polyfill.js
Created April 4, 2012 08:04
Polyfill for getElementsByClassName
// Add a getElementsByClassName function if the browser doesn't have one
// Limitation: only works with one class name
// Copyright: Eike Send http://eike.se/nd
// License: MIT License
if (!document.getElementsByClassName) {
document.getElementsByClassName = function(search) {
var d = document, elements, pattern, i, results = [];
if (d.querySelectorAll) { // IE8
return d.querySelectorAll("." + search);