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 / 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 / index.html
Created September 24, 2014 16:35
Main page for the BB test
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/bootstrap.min.css">
@trumbitta
trumbitta / yeah.config.js
Created January 30, 2015 18:46
Angular testing with constant
angular.module('wiz.config', [])
.constant('ENV', {URL:{FULL:'http://localhost:1337'}})
;
@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 / 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: