Skip to content

Instantly share code, notes, and snippets.

View fijiwebdesign's full-sized avatar

Gabirieli Lalasava fijiwebdesign

View GitHub Profile
@fijiwebdesign
fijiwebdesign / single-page-scroll.js
Last active August 29, 2015 14:06
Make all in page anchors scroll page with animation
// requires jquery selector
$("a[href^=#]").click(function(e) {
var duration = $(this).data('scroll') || 750;
var target = $(this).attr('href');
var $el = $(target);
if ($el.length || target == '#') {
e.preventDefault(); // prevent jumping to target or adding hash in url
// scroll to the element
$('html, body').animate({
scrollTop: target == '#' ? 0 : $el.offset().top
@fijiwebdesign
fijiwebdesign / shell.php
Created August 23, 2014 13:49
PHP shell interpreter. Just copy to a file and execute the file to drop into a PHP command line.
#!/usr/bin/env php
<?php while (1) { fputs(STDOUT, "\n\-PHP$ "); eval(trim(fgets(STDIN))); } ?>