All credit: http://stackoverflow.com/questions/4006324/how-to-atomically-delete-keys-matching-a-pattern-with-redis
redis-cli [options] KEYS "prefix:*" | xargs redis-cli [options] DEL
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
UPDATE wp_options SET option_value = replace(option_value, 'http://servier.appsdoc.com', 'http://www.jambeslegeres.ma') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://servier.appsdoc.com','http://www.jambeslegeres.ma'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://servier.appsdoc.com', 'http://www.jambeslegeres.ma'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://servier.appsdoc.com','http://www.jambeslegeres.ma'); |
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.org] | |
listen = /srv/vhtdocs/example.org/log/.php-fpm.sock | |
listen.owner = example_org | |
listen.group = www-data | |
listen.mode = 0660 | |
user = example_org | |
group = example_org | |
pm = dynamic |
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
-- Good reference : http://big-elephants.com/2013-09/exploring-query-locks-in-postgres/ | |
-- show running queries (pre 9.2) | |
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(query_start, clock_timestamp()), usename, query |
I hereby claim:
- I am aidhamza on github.
- I am aidhamza (https://keybase.io/aidhamza) on keybase.
- I have a public key ASDqZAO4d38xV6-piaR2iSGdFczLEKDJeqPRtWYKs0tENAo
To claim this, I am signing this object:
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
## Install with PHP 7.1 | |
``` | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
sudo apt-get install libapache2-mod-php7.1 | |
sudo a2dismod php5 | |
sudo a2enmod php7.1 | |
sudo apt-get install php7.1-dom php7.1-mbstring php7.1-zip php7.1-gd php7.1-xml php7.1-gmp php7.1-mysql php7.1-sqlite php7.1-mcrypt php7.1-curl | |
``` |
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
package safebuffer | |
import ( | |
"bytes" | |
"sync" | |
) | |
// Buffer is a goroutine safe bytes.Buffer | |
type Buffer struct { | |
buffer bytes.Buffer |
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
# using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty | |
# more info @ http://wiki.nginx.org/HttpLuaModule#access_by_lua | |
http { | |
lua_package_path "/etc/nginx/include.d/?.lua;;"; | |
lua_socket_pool_size 100; | |
lua_socket_connect_timeout 10ms; | |
lua_socket_read_timeout 10ms; | |
server { |
OlderNewer