Skip to content

Instantly share code, notes, and snippets.

@werty1st
werty1st / new_gist_file
Created June 19, 2013 20:28
CSS box div droping shadow with gradient
http://nicolasgallagher.com/css-drop-shadows-without-images/demo/
@werty1st
werty1st / gist:5822430
Created June 20, 2013 12:54 — forked from qharlie/gist:5271721
Many people use forever https://github.com/nodejitsu/forever , which has become pretty much industry standard. If you are on Ubuntu, you can also use init scripts ( google 'ubuntu upstart' ), that will do much the same thing, and are guaranteed to if the server ever gets restarted. Here is my upstart script for example https://gist.github.com/qb…
#!upstart
description "MyApp"
author "MyApp by charlie"
env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
respawn
start on runlevel [23]
stop on shutdown
@werty1st
werty1st / new_gist_file
Created June 22, 2013 09:51
Install derby server
sudo npm install -g derby
sudo apt-get install mongodb
@werty1st
werty1st / new_gist_file
Created July 9, 2013 09:35
php commandline args parser
$options = getopt("d::t::");
$d = array_key_exists("d",$options);
$t = array_key_exists("t",$options);
switch (strlen($options["d"])){
case 3: $dddd = true;
case 2: $ddd = true;
case 1: $dd = true;
}
@werty1st
werty1st / new_gist_file
Created July 9, 2013 15:30
imperia javascript events onload and onsubmit
load_handlers.push("loadui()");
submit_handlers.push("validateall()");
@werty1st
werty1st / new_gist_file
Created July 24, 2013 13:46
Chrome Custom Icons
chrome unter anderem user ausführen
mit xprop alle chrome prozesse=fenster dieses users umbennen
http://glx-dock.org/bg_topic.php?t=5145
@werty1st
werty1st / linux console language setting
Created July 26, 2013 14:37
linux console language setting
Debian:
dpkg-reconfigure --priority=low console-data
Fedora:
system-config-keyboard
@werty1st
werty1st / new_gist_file
Created August 1, 2013 14:49
Create a backup of what packages are currently installed
Create a backup of what packages are currently installed:
sudo dpkg --get-selections > list.txt
Then (on another system) restore installations from that list:
sudo dpkg --clear-selections
sudo dpkg --set-selections < list.txt
To get rid of stale packages
sudo apt-get autoremove
To get installed like at backup time
sudo apt-get dselect-upgrade
@werty1st
werty1st / Fedora SE linux
Created August 15, 2013 10:02
Fedora SE linux
setsebool -P httpd_enable_homedirs true
chcon -R -t httpd_sys_content_t /home/testuser/public_html
setsebool -P httpd_can_network_connect 1
$ sudo setsebool -P httpd_read_user_content on
$ sudo setsebool -P httpd_sys_script_anon_write on
$ sudo chcon -R -t public_content_rw_t cache/
@werty1st
werty1st / weak passwords
Created August 22, 2013 16:20
weak passwords
gedit /etc/pam.d/system-auth&
alles anderen password felder auskommentieren
password required pam_unix.so nullok obscure min=4 max=8 md5