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
server.modules = ( | |
"mod_access", | |
"mod_alias", | |
"mod_accesslog", | |
"mod_extforward", | |
"mod_rewrite", | |
#"mod_fastcgi", | |
"mod_proxy", | |
"mod_redirect" ) |
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
set enc=utf-8 | |
" set fencs=utf8 | |
set ruler | |
set number | |
set autoindent | |
set expandtab | |
set incsearch | |
set shiftwidth=4 | |
set tabstop=4 | |
set showcmd |
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
-- PostgreSql | |
SELECT | |
pg_database.datname AS "Database Name", | |
pg_database_size(pg_database.datname) / 1024.0 / 1024.0 AS "Database Size (MB)" | |
FROM pg_database; | |
-- MySql | |
SELECT | |
table_schema "Database Name", | |
sum( data_length + index_length ) / 1024 / 1024 "Database Size (MB)" |
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
firstname | lastname | username | ||
---|---|---|---|---|
Bill | Gates | [email protected] | bill.gates | |
Steve | Ballmer | [email protected] | steve.ballmer |
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
# ~/.bashrc | |
export EDITOR=vim | |
export HISTCONTROL=ignoredups | |
export LSCOLORS=excxbxbxfxexexfxfxexex | |
alias ls="ls --color=auto" | |
alias ll="ls -lhF" | |
alias rm="rm -v" | |
alias pacman="pacman-color" |
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
-- PostgreSQL | |
SELECT | |
schemaname, | |
tablename, | |
pg_size_pretty(size) AS size_pretty, | |
pg_size_pretty(total_size) AS total_size_pretty | |
FROM ( | |
SELECT *, | |
pg_relation_size(schemaname||'.'||tablename) AS size, |
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
CREATE OR REPLACE FUNCTION slugify(str text) RETURNS text AS $$ | |
BEGIN | |
RETURN lower(translate(str, | |
'äëïöüáéíóúâêîûôåãõàèìòùřšěčůńýśćłęąĄŃÝŚĆŁĘÄËÏÖÜÁÉÍÓÚÂÊÎÛÔÅÃÕÀÈÌÒÙŘŠĚČŮß :;-²ø®(),./\"’`''', | |
'aeiouaeiouaeiouaaoaeioursecunyscleaANYSCLEAEIOUAEIOUAEIOUAAOAEIOURSECUs____2dR' -- missing chars will be removed | |
)); | |
END | |
$$ LANGUAGE plpgsql; |
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
export MARKPATH=$HOME/.marks | |
function jump { | |
cd -P $MARKPATH/$1 2>/dev/null || echo "No such mark: $1" | |
} | |
function mark { | |
mkdir -p $MARKPATH; ln -s $(pwd) $MARKPATH/$1 | |
} | |
function unmark { | |
rm -i $MARKPATH/$1 | |
} |
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
browser.fixup.alternate.enabled;false | |
browser.urlbar.trimURLs;false | |
general.smoothScroll;false | |
plugins.click_to_play;true | |
plugins.notifyMissingFlash;false |
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
WITH RECURSIVE x( s, ind ) AS | |
( SELECT sud, position( '.' IN sud ) | |
FROM (SELECT '91.7......326.9.8...7.8.9...86.3.17.3.......6.51.2.84...9.5.3...2.3.149......2.61'::text | |
AS sud) xx | |
UNION ALL | |
SELECT substr( s, 1, ind - 1 ) || z || substr( s, ind + 1 ) | |
, position('.' IN repeat('x',ind) || substr( s, ind + 1 ) ) | |
FROM x | |
, (SELECT gs::text AS z FROM generate_series(1,9) gs) z | |
WHERE ind > 0 |
OlderNewer