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
SELECT group_concat(distinct column_name) as fields | |
FROM information_schema.columns | |
WHERE table_name='table_name' and column_name like 'text%' INTO @COLUMNS; | |
SET @s = CONCAT('SELECT ',@COLUMNS,' FROM table_name limit 10'); | |
PREPARE stmt FROM @s; | |
EXECUTE stmt; | |
-- DEALLOCATE PREPARE stmt; |
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
Sublime 4 | |
-------------- | |
set_ui theme | |
TrailingSpaces | |
Rainbow CSV | |
Sublime 3 | |
-------------- | |
SideBarEnhancements | |
BracketHighlighter |
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
zend_extension="/usr/lib/php/20151012/xdebug.so" | |
xdebug.default_enable = 1 | |
xdebug.idekey = "vagrant" | |
xdebug.remote_enable = 1 | |
xdebug.remote_autostart = 0 | |
xdebug.remote_port = 9000 | |
xdebug.remote_handler=dbgp | |
xdebug.remote_log="/var/log/xdebug/xdebug.log" | |
xdebug.remote_host=10.0.2.2 ; IDE-Environments IP, from vagrant box. | |
xdebug.show_local_vars=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
<?php | |
if( !function_exists('apache_request_headers') ) { | |
function apache_request_headers() { | |
$arh = array(); | |
$rx_http = '/\AHTTP_/'; | |
foreach($_SERVER as $key => $val) { | |
if( preg_match($rx_http, $key) ) { | |
$arh_key = preg_replace($rx_http, '', $key); | |
$rx_matches = array(); | |
// do some nasty string manipulations to restore the original letter case |
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
alias dockerup="docker-machine start default && eval \$(docker-machine env default)" | |
# Fix numeric keypad | |
# 0 . Enter | |
bindkey -s "^[Op" "0" | |
bindkey -s "^[On" "." | |
bindkey -s "^[OM" "^M" | |
# 1 2 3 | |
bindkey -s "^[Oq" "1" | |
bindkey -s "^[Or" "2" |
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
This list obtained from | |
http://www.umass.edu/microbio/rasmol/country-.txt | |
AD Andorra | |
AE United Arab Emirates | |
AF Afghanistan | |
AG Antigua and Barbuda | |
AI Anguilla | |
AL Albania | |
AM Armenia |
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
#!/bin/bash | |
imgs=("blowfish" "bong" "bud-frogs" "bunny" "cheese" "cower" "daemon" "default" "dragon" "dragon-and-cow" "elephant" "elephant-in-snake" "eyes" "flaming-sheep" "ghostbusters" "head-in" "hellokitty" "kiss" "kitty" "koala" "kosh" "luke-koala" "meow" "milk" "moofasa" "moose" "mutilated" "ren" "satanic" "sheep" "skeleton" "small" "sodomized" "stegosaurus" "stimpy" "supermilker" "surgery" "telebears" "three-eyes" "turkey" "turtle" "tux" "udder" "vader") | |
count=${#imgs[@]} | |
rand=$[ $RANDOM % $count ] | |
eval "fortune | cowsay -n -f ${imgs[$rand]} | lolcat" |
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
git branch -a | grep -v HEAD | perl -ne 'chomp($_); s|^\*?\s*||; if (m|(.+)/(.+)| && not $d{$2}) {print qq(git branch --track $2 $1/$2\n)} else {$d{$_}=1}' | csh -xfs |
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
FRONTEND PLENO | |
Atividades: | |
- Desenvolver Single Page Applications | |
- Desenvolver um sistema interativo e com qualidade. | |
- Escrever um código limpo e que funcione em todos os browsers. | |
- Seguir todas as recomendações dos guias de código. | |
- Desenvolvimento voltado a usabilidade. | |
- Garantir que o sistema tenha alto desempenho. | |
- Criar as funcionalidades de acordo com as requisições do cliente. |
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
#!/bin/bash | |
for filename in *.jpg; do | |
newFilename=$(echo $filename | \ | |
sed -E 's#^.+_(.+).jpg$#\1.jpg#') | |
mv "$filename" new/"$newFilename" | |
done |