This file contains 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 | |
# from: https://answers.launchpad.net/ubuntu/+source/gnome-panel/+question/8152 | |
# Cristian Măgherușan-Stanciu | |
if [[ "x$1" == "xon" ]] | |
then | |
echo "Turning on VGA" | |
xrandr --output VGA --left-of LVDS --auto | |
echo "Moving panel to second display" | |
gconftool-2 --set "/apps/panel/toplevels/top_panel_screen0/monitor" --type integer "1" |
This file contains 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
# only for 1.4.24 and above! | |
# | |
server.modules += ( "mod_rewrite" ) | |
url.rewrite-if-not-file = ( | |
"^/events/(.*)/$" => "/events/$1/index.php" | |
) | |
# other solution: mod_magnet | |
server.modules += ( "mod_magnet" ) | |
magnet.attract-physical-path-to = ( "/etc/lighttpd/rewrite.lua" ) |
This file contains 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
fq:-(-age:[18 TO 60] AND age:[* TO *]) |
This file contains 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
// set video to unlisted | |
$accessControlElement = new Zend_Gdata_App_Extension_Element( | |
'yt:accessControl', 'yt', 'http://gdata.youtube.com/schemas/2007', '' | |
); | |
$accessControlElement->extensionAttributes = array( | |
array( | |
'namespaceUri' => '', | |
'name' => 'action', | |
'value' => 'list' |
This file contains 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/php | |
<?php | |
require_once 'Zend/Oauth/Consumer.php'; | |
require_once 'Zend/Console/Getopt.php'; | |
//set valid config file types/extensions | |
$configTypes = array('ini', 'xml', 'json', 'yaml'); | |
//setup command line opts | |
$opts = new Zend_Console_Getopt(array( |
This file contains 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
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
<script> | |
$.getJSON("http://api.ipinfodb.com/v3/ip-country/?key=API_KEY_HERE&format=json&callback=?", | |
function(data){ | |
alert(data['countryCode']); //DE,AT ... | |
}); | |
</script> | |
</head> |
This file contains 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
varnishadm -S /etc/varnish/secret -T 127.0.0.1:6082 purge.url "^/asset/Look-.*-ski-thumb.jpg$" |
This file contains 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 /etc/fstab | |
# / was on /dev/sda1 during installation | |
UUID=73d37f98-4668-4686-985b-6574087e62e8 / ext4 noatime,discard,errors=remount-ro,user_xattr 0 1 | |
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0 | |
===================================================== | |
Firefox: about:config - add/set key: | |
browser.cache.disk.parent_directory |
This file contains 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 | |
# test MTU of 1500: | |
ping -M do -s 1472 127.0.0.1 | |
# check MTU to a destination along a path: | |
tracepath 127.0.0.1 |
This file contains 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
# add to / update php.ini: | |
suhosin.executor.include.whitelist=phar | |
[Phar] | |
phar.readonly = Off | |
# sample phing buildfile: | |
<?xml version="1.0" encoding="UTF-8"?> |