Skip to content

Instantly share code, notes, and snippets.

View jms's full-sized avatar

Jeronimo Martinez Sanchez jms

View GitHub Profile
@jms
jms / gitconfig
Created June 17, 2014 17:37
gitconfig
[user]
name =
email =
[color]
ui = auto
branch = auto
interactive = auto
diff = auto
status = auto
[core]
@jms
jms / defer js
Created July 25, 2014 15:52
defer loading javascript
<script type="text/javascript">
function downloadJSAtOnload() {
var element = document.createElement("script");
element.src = "test.js";
document.body.appendChild(element);
}
if (window.addEventListener)
window.addEventListener("load", downloadJSAtOnload, false);
else if (window.attachEvent)
window.attachEvent("onload", downloadJSAtOnload);
@jms
jms / edge
Created July 25, 2014 23:28
adobe edge bootstrap callback sample
AdobeEdge.bootstrapCallback(function(compId){
var comp = AdobeEdge.getComposition("EDGE-579335346");
var stage = comp.getStage();
//console.log("Stage: " + stage);
$(stage.lookupSelector("Stage")).append("<input type='text' name='date' id='date' />");
//var sel = stage.lookupSelector("date");
//$("#date").css({"position":"absolute", "top":0, "left":200});
//$("#date").datepicker();
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
@jms
jms / wp-featured-image
Created October 15, 2014 06:30
featured-image wordpress

Deploy Rails 4 app with Dokku on DigitalOcean

Install dokku

First create a Ubuntu 13.04 x64 droplet on DigitalOcean Control Panel

Then ssh with root account, run this in termianl:

$ wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash
@jms
jms / server.md
Last active August 29, 2015 14:15 — forked from jtadeulopes/server.md

Update and upgrade the system

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get autoremove
sudo reboot
@jms
jms / link-list
Created February 13, 2015 23:04
get page links with wget
@jms
jms / revert git merge
Created March 16, 2015 21:00
revert git merge
git reset --merge ORIG_HEAD
# basic pfctl control
# ==
# Related: http://www.OpenBSD.org
# Last update: Tue Dec 28, 2004
# ==
# Note:
# this document is only provided as a basic overview
# for some common pfctl commands and is by no means
# a replacement for the pfctl and pf manual pages.