Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
86937 isset | |
43159 echo | |
31697 empty | |
29252 substr | |
26146 count | |
24248 is_array | |
22572 strlen | |
19365 sprintf | |
18090 unset | |
16584 str_replace |
<?php | |
class SecureSessionHandler extends SessionHandler { | |
protected $key, $name, $cookie; | |
public function __construct($key, $name = 'MY_SESSION', $cookie = []) | |
{ | |
$this->key = $key; | |
$this->name = $name; |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
#!/bin/bash | |
# Recursive file convertion windows-1251 --> utf-8 | |
# Place this file in the root of your site, add execute permission and run | |
# Converts *.php, *.html, *.css, *.js files. | |
# To add file type by extension, e.g. *.cgi, add '-o -name "*.cgi"' to the find command | |
find ./ -name "*.php" -o -name "*.html" -o -name "*.css" -o -name "*.js" -type f | | |
while read file | |
do |
An example to patch unixODBC-2.3.0 on a 64bit machine to work with oracle 8.
First download unixODBC source. mkdir /tmp/unixODBC/source
Create two new folder. mkdir /tmp/unixODBC/patch/original mkdir /tmp/unixODBC/patch/unixODBC-2.3.0/DriverManager/
cp /tmp/unixODBC/source/unixODBC-2.3.0/DriverManager/SQLConnect.c /tmp/unixODBC/patch/original
I hereby claim:
To claim this, I am signing this object:
#!/bin/sh | |
# Check if an IP address is listed on one of the following blacklists | |
# The format is chosen to make it easy to add or delete | |
# The shell will strip multiple whitespace | |
BLISTS=" | |
bl.score.senderscore.com | |
bl.mailspike.net | |
bl.spameatingmonkey.net | |
b.barracudacentral.org |
#!/bin/bash | |
TIMESTAMP=$(date +'%Y-%m-%d_%Hh%Mm') | |
BACKUP_FOLDER=/mnt/backup/mysql | |
MYSQL_USER=admin | |
MYSQL_PASS=`cat /etc/psa/.psa.shadow` | |
MAX_DAYS=15 | |
DATABASES=`mysql --user=$MYSQL_USER -p$MYSQL_PASS -e "SHOW DATABASES;" | grep -Ev "(Database|information_schema|performance_schema)"` | |
mkdir -p "$BACKUP_FOLDER" |
/var/log/iptables.log | |
{ | |
rotate 7 | |
daily | |
missingok | |
notifempty | |
delaycompress | |
compress | |
postrotate | |
invoke-rc.d rsyslog reload > /dev/null |
Due to the incessant swarm of complete and utter nonsense that has been forcing its way into Firefox over time, I've decided to start collecting my personal list of “must-have” about:config tweaks required to turn Firefox into a functional brower.
NOTE: Unfortunately this is somewhat out of date. The comments link to some resources that may be more up-to-date. Patches welcome.
These can be used for nefarious purposes and to bypass access restrictions.