Skip to content

Instantly share code, notes, and snippets.

View netdesign's full-sized avatar

Netdesign netdesign

View GitHub Profile
@netdesign
netdesign / Walkthrough.mkd
Created May 31, 2012 11:40
Quick 'n dirty start with gitolite

NOTICE

IMPORTANT: This guide is for the old 2.x version of gitolite, which is(as of April 22nd 2012) the one found in most OS package repositories. Please consider using the current 3.x branch of gitolite, for which a very nice howto is written by the author.

Introduction

This is a quick walkthrough on how to install and begin using gitolite in under a minute(only 4 commands!). Just follow along through the shell blocks. Reading the gitolite docs is STRONGLY recommended.

Assumptions

@netdesign
netdesign / gist:2793843
Created May 26, 2012 12:54
Autocomplete
<input type="text" name="name" id="auth_name" autocomplete="on"></input>
<form action="javascript:void(0)" onsubmit="myAuth.login()">
<input type="password" name="password" id="auth_passwd" autocomplete="off"></input>
</form>
<input type="button" value="Log In" onclick="myAuth.login()">
this.e = function(e,cb){
var that=this,resolvedCb=function(event){cb.call(that,event)};
if(window.addEventListener){ // ALL
this.bj.addEventListener(e,resolvedCb,false);
}
else if(window.attachEvent){ // IE
this.bj.attachEvent(e,resolvedCb);
}
return this;
};
@netdesign
netdesign / gist:1923061
Created February 27, 2012 10:49
Centos 6.2 boot options
vmlinuz0 initrd=initrd0.img root=live:CDLABEL=CentOS.....img rootfstype=auto ro liveimg textinst noswap nolvmmount rd.luks=0 rd.md=0 rd.dm=0 ip=192.168.x.x netmask=255.255.255.0 gateway=192.168.x.x dns=212.216.112.112 ksdevice=eth0 vnc vncpassword=qwerty
this is the default boot line for text installation plus some options (vnc, ip....)
@netdesign
netdesign / New rewrite
Created February 10, 2012 10:58
Rewrite rules
RewriteEngine On
RewriteCond %{REQUEST_URI} .(css)$
RewriteRule ^/(.)/style/(.)$ http://127.0.0.1/Lavori/mq/www/rew-test.php?css=$2 [PT]
RewriteLog /var/log/apache2/rew.log
RewriteLogLevel 9
LOGFILE
127.0.0.1 - - [10/Feb/2012:12:52:23 +0100] [127.0.0.1/sid#7f71e6c25390]rid#7f71e6f93d68/initial init rewrite engine with requested uri /Lavori/mq/www/style/testtest.css
127.0.0.1 - - [10/Feb/2012:12:52:23 +0100] [127.0.0.1/sid#7f71e6c25390]rid#7f71e6f93d68/initial applying pattern '^/(.)/style/(.)$' to uri '/Lavori/mq/www/style/testtest.css'
@netdesign
netdesign / Last Log
Created February 9, 2012 10:06
Apache conf
[Thu Feb 09 11:44:06 2012] [debug] mod_ext_filter.c(642): [client 127.0.0.1] filtering `/Lavori/mq/www/fb.html' of type `text/html' through `/bin/grep', cfg ExtFilterOptions DebugLevel=9 LogStderr !PreserveContentLength ExtFilterInType */* ExtFilterOuttype text/html, referer: http://127.0.0.1/Lavori/mq/www/
[Thu Feb 09 11:44:06 2012] [debug] mod_ext_filter.c(834): [client 127.0.0.1] (70014)End of file found: apr_file_read(child output), len 18446744073709551615, referer: http://127.0.0.1/Lavori/mq/www/
@netdesign
netdesign / gist:1769100
Created February 8, 2012 12:45
some cUrl requests
curl http://www.mydomain.com -H "Accept-Encoding: gzip, deflate" -I
HTTP/1.1 200 OK
Date: Wed, 08 Feb 2012 12:44:18 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 20
Content-Type: text/html; charset=UTF-8
PImage img;
void setup(){
size(640, 360);
img = loadImage("immagine.png");
smooth();
}
void draw(){
background(0);
@netdesign
netdesign / gist:1457141
Created December 10, 2011 23:51
Movimento
// La posizione del punto viene dichiarata con due variabili x ed y
int x = 320;
int y = 180;
float move = 0.0;
void setup(){
size(640, 360);
smooth();
}
@netdesign
netdesign / gist:1457113
Created December 10, 2011 23:45
Terzo Esempio
// La posizione del punto viene dichiarata con due variabili x ed y
int x = 100;
int y = 100;
void setup(){
size(640, 360);
smooth();
}
void draw(){