Skip to content

Instantly share code, notes, and snippets.

View trumbitta's full-sized avatar
🚀
Basically a rocket ship. And a bear 🐻.

William Ghelfi trumbitta

🚀
Basically a rocket ship. And a bear 🐻.
View GitHub Profile
@trumbitta
trumbitta / hide-address-bar-webkit
Created September 29, 2011 10:19
A snippet taken from BostonGlobe.com for a proper hiding of the address bar in crappy webkit browsers as mine in HTC Desire :p
//Thx to Ethan Marcotte, anyway
//scroll to top, hide address bar on mobile devices - 1 for android, 0 for the rest
if( !location.hash ){
//scroll to top
window.scrollTo( 0, 1 );
var scrollTop = 1,
getScrollTop = function(){
return "scrollTop" in doc.body ? doc.body.scrollTop : 1;
};
@trumbitta
trumbitta / .bash_aliases
Last active September 2, 2016 21:00 — forked from henrik/.bashrc
My version with tweaks and inspiration from holman/dotfiles
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'
alias git=hub
alias gis="git status"
alias gits="git status"
alias gitp="git pull"
alias safepull="git stash && git pull && git stash apply"
@trumbitta
trumbitta / entando_aliases
Last active October 2, 2015 20:18
A bunch of bash aliases for not having to remember a lot of different commands while using Entando ( >= 2.4.0.1 )
# Put this in your ~/.bash_aliases
# and exploit the tab completion for
# maximum comfort
#
# Author: William Ghelfi <trumbitta@gmail.com>
#
#Entando
alias entando-start="mvn clean jetty:run"
alias entando-pg-db-backup="ant PG-db-backup"
@trumbitta
trumbitta / VirtualHost
Last active October 12, 2015 01:57
Quick resources for an Entando falvored Java web server provisioning
<VirtualHost FQDN:80>
ServerName FQDN
DocumentRoot /var/www/FQDN
ErrorLog /var/log/apache2/FQDN_error.log
LogLevel warn
CustomLog /var/log/apache2/FQDN_access.log combined
# Use SetEnvIf to st no-jk when /home/ is encountered
SetEnvIf Request_URI "/APPNAME/resources/cms/*" no-jk
@trumbitta
trumbitta / provision-entando-1-system-update.sh
Last active October 12, 2015 04:57
A couple of scripts for gettin ready a web server for Entando
# expecially tailored for Aruba Cloud (www.cloud.it)
# Ubuntu 12.10
# should work weel on any Ubuntu 12.10 with ssh root access
# example: cat provision-entando-1-system-update.sh | ssh me@myserver /bin/bash
cat <<"EOM"
###########################################################
# #
# 1. UPDATING THE SYSTEM #
# #
@trumbitta
trumbitta / tint2rc
Created April 30, 2013 14:10
tint2rc
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 0
border_width = 1
background_color = #000000 60
border_color = #FFFFFF 16
@trumbitta
trumbitta / fartscroll snippet
Last active December 17, 2015 03:59
Fartscroll
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="https://github.com/theonion/fartscroll.js/raw/master/fartscroll.js"></script>
<script>
$(document).ready(function() {
$(document).fartscroll(400);
});
</script>
// Just the relevant snippet:
copy:
assets:
files: {
'dist/img': ['img/*']
}
// This only creates an empty 'img' dir under 'dist'
// The expected tree to be copied under dist is:
@trumbitta
trumbitta / landing1.html
Last active August 29, 2015 14:03
Bootstrap in Practice: a landing page
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap In Practice - Landing Page Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Bootstrap -->
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" />
</head>
<body>
<h1>Hello, world!</h1>
@trumbitta
trumbitta / Vagrantfile
Last active February 3, 2022 15:01
Vagrant conf for a box with ubuntu trusty, node, and mongo.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.