This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while [ 1 ]; | |
do | |
if [ `xprintidle` -gt 300000 ]; | |
then | |
pid=`gnome-screensaver-command -q | head -n 1 | awk '{print $4}'` | |
if [ "$pid" == "inactive" ];then | |
gnome-screensaver-command -l; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## uploading to google | |
## rev: 22 Aug 2012 16:07 | |
det=`date +%F` | |
browser="Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0.1" | |
username="[email protected]" | |
password="password" | |
accountype="HOSTED" #gooApps = HOSTED , gmail=GOOGLE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
phpinfo(); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.autoload_paths += %W(#{config.root}/lib) | |
config.middleware.use "NoWww", ['pasarcairo.com', '192.168.0.177'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#example vhost protect wp-login.php at nginx php-fpm | |
upstream arraudhah { | |
server unix:/var/run/php5-fpm.sock; | |
} | |
server { | |
listen 80; | |
server_name ar-raudhah.info www.ar-raudhah.info; | |
server_name_in_redirect off; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deanet@husaini ~ $ ssh [email protected] -v | |
OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011 | |
debug1: Reading configuration data /home/deanet/.ssh/config | |
debug1: Reading configuration data /etc/ssh/ssh_config | |
debug1: Applying options for * | |
debug1: Connecting to 116.251.208.13 [116.251.208.13] port 22. | |
debug1: Connection established. | |
debug1: identity file /home/deanet/.ssh/id_rsa type 1 | |
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048 | |
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
#set-debian-locales-utf8.pl | |
sub exec_ok($$); | |
use strict; | |
use warnings; | |
if (! ( `debconf-show locales` =~ m/locales\/ default_environment_locale: en_US.UTF-8/ ) ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Works for Airtime v.2.3.1 and for Airtime v.2.4.0 supported AAC+ as defaults. just need extra config (https://wiki.sourcefabric.org/x/NgPQ) . | |
root@cpalstream:~# su - postgres | |
postgres@cpalstream:~$ psql -c "update cc_pref set valstr = valstr||', fdkaac' where keystr = 'stream_type'" airtimeUPDATE 1 | |
postgres@cpalstream:~$ | |
- Make sure our liquidsoap works with aacp encode as well (apt-get install libaacplus-dev:amd64 libaacplus-ocaml libaacplus-ocaml-dev or see https://gist.github.com/deanet/5982456 for more installation of airtime v.2.3.1) | |
- live works: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Rack | |
# Automatically redirects to the configurable domain | |
# | |
# If request comes from other than specified domains it redirects to the first | |
# domain from the list | |
class DomainRedirect | |
def initialize(app, hosts = []) | |
@app = app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub vcl_recv { | |
#taken from http://www.useragentstring.com/pages/useragentstring.php | |
if (req.http.user-agent ~ "008") { | |
return (pass); | |
} | |
if (req.http.user-agent ~ "ABACHOBot") { | |
return (pass); | |
} |