Skip to content

Instantly share code, notes, and snippets.

View kevinmartin's full-sized avatar
:octocat:

Kevin Jose Martin kevinmartin

:octocat:
View GitHub Profile
<!DOCTYPE html>
<html>
function smoothScroll(scrollTargetY, speed) {
var nextTick,
currentTime = 0,
scrollY = window.scrollY || document.documentElement.scrollTop,
time = Math.max(0.1, Math.min(Math.abs(scrollY - scrollTargetY) / speed, 0.8));
nextTick = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
function (callback) {
@kevinmartin
kevinmartin / 0_reuse_code.js
Created August 21, 2014 00:36
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@kevinmartin
kevinmartin / deploy_heroku.sh
Created March 1, 2014 19:59
Project Environment Variables to Branch Environment Variables - For Heroku Deployments
#!/bin/bash
BRANCH=${CIRCLE_BRANCH^^}
HEROKU_APP=$BRANCH"_HEROKU_APP"
AMP_ENV=$BRANCH"_AMP_ENV"
EMAIL=$BRANCH"_EMAIL"
REDIS_HOST=$BRANCH"_REDIS_HOST"
COOKIE_DOMAIN=$BRANCH"_COOKIE_DOMAIN"
L10N=$BRANCH"_L10N"
DB_DATABASE=$BRANCH"_DB_DATABASE"
@kevinmartin
kevinmartin / soffice
Last active July 11, 2018 13:23 — forked from stuzart/gist:3787679
#!/bin/bash
# originally from: http://code.google.com/p/openmeetings/wiki/OpenOfficeConverter
# openoffice.org headless server script
#
# chkconfig: 2345 80 30
# description: headless openoffice server script
# processname: openoffice
#
# Author: Vic Vijayakumar
# Modified by Federico Ch. Tomasczik
# memcached requires libevent
cd /usr/local/src
curl -O https://github.com/downloads/libevent/libevent/libevent-2.0.17-stable.tar.gz
tar -xvzf libevent-2.0.17-stable.tar.gz
cd libevent-2.0.17-stable*
./configure
make
sudo make install
# Compile memcached utility