start new:
tmux
start new with session name:
tmux new -s myname
| #!/bin/bash | |
| # | |
| # This script configures WordPress file permissions based on recommendations | |
| # from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
| # | |
| # Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
| # | |
| # | |
| # RODAR USANDO ./fix-wordpress-permissions.sh <nome_da_pasta_wordpress> | |
| # |
| /** | |
| * Arquivos acentuados no upload do WordPress | |
| * @url https://wordpress.org/support/topic/uploaded-image-with-accents-in-name-image-dont-show-in-safari-6 | |
| */ | |
| function sanitize_filename_on_upload($filename) { | |
| $param = explode('.', $filename); | |
| $ext = end($param); | |
| // Replace all weird characters | |
| $sanitized = preg_replace('/[^a-zA-Z0-9-_.]/', '', substr($filename, 0, -(strlen($ext)+1))); | |
| // Replace dots inside filename |
| <?php | |
| $WP_categorias_filtro = array( | |
| 'post_type' => array('proposta', 'problema'), | |
| 'posts_per_page' => 6, | |
| 'meta_query' => array( | |
| 'relation' => 'OR', | |
| 'contagem' => array( | |
| 'key' => 'contagem_views', | |
| 'type' => 'NUMERIC', | |
| 'compare' => 'EXISTS' |
| "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause" XF86AudioPlay | |
| "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop" XF86AudioStop | |
| "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next" XF86AudioNext | |
| "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous" XF86AudioPrevious |
| {"lastUpload":"2022-01-12T14:26:48.418Z","extensionVersion":"v3.4.3"} |
| <?php | |
| // É aconselhável criar um backup do banco antes | |
| // crie a taxonomia cidade na functions do tema | |
| add_action('init', 'register_locations'); | |
| function register_locations() { | |
| register_taxonomy( 'cidade',array ( | |
| 0 => 'locais', | |
| ), | |
| array( 'hierarchical' => true, |
| # Inspirations: | |
| # http://mutelight.org/practical-tmux | |
| # http://zanshin.net/2013/09/05/my-tmux-configuration/ | |
| # http://files.floriancrouzat.net/dotfiles/.tmux.conf | |
| # http://stackoverflow.com/questions/9628435/tmux-status-bar-configuration | |
| # https://github.com/Lokaltog/powerline | |
| # https://github.com/remiprev/teamocil | |
| # http://superuser.com/questions/74492/whats-the-best-prefix-escape-sequence-for-screen-or-tmux | |
| # http://blog.hawkhost.com/2010/07/02/tmux-%E2%80%93-the-terminal-multiplexer-part-2/ | |
| # |
| { | |
| "states": [ | |
| { | |
| "uf": "AC", | |
| "name": "Acre", | |
| "cities": [ | |
| "Acrelândia", | |
| "Assis Brasil", | |
| "Brasiléia", | |
| "Bujari", |
| add_filter( 'wp_head', function(){ | |
| if (is_page(XX) && !is_user_logged_in()) { | |
| add_filter('the_content', function(){ | |
| return __('Sorry! Onlu logged-in user are allowed to see the content'); | |
| }, 99); | |
| } | |
| }); |