- Copy this bash into your /usr/local/bin folder
- Assign execution permissions
- Create another file named repos.txt
- In repos.txt list with full path each of the repos you want to be part
- Update the bash with the full path to your repos.txt file
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
convert -define jpeg:size=800x800 'MC-SFC002 Sófa Cama Queen Aloise.png' -thumbnail '800x800>' \ | |
-gravity center -crop 800x800+0+0\! \ | |
-background white -flatten 'thumbs/MC-SFC002 Sófa Cama Queen Aloise.png' | |
mogrify -format jpg -path thumbs -thumbnail '300x300>' -gravity center -crop 300x300+0+0\! -background white -flatten *.png |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
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
<?php | |
$string = '12(345)6(78)8(012(34(56)7))0123'; | |
$regex = '/(\(\w+\))/'; | |
$result = $string; | |
while( strpos($resultado,'(') !== false) { | |
$result = preg_replace_callback($regex, function($matches) { |
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
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:2.2.+' | |
// NOTE: Do not place your application dependencies here; they belong |
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
#! /bin/bash | |
# move to your local branch | |
git checkout local_branch | |
# pull the remotes | |
git fetch --all | |
# merge and squash | |
git merge origin/dirty_branch --squash |
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
#!/usr/bin/env bash | |
wget http://dev.mysql.com/get/mysql-apt-config_0.8.2-1_all.deb | |
debconf-set-selections <<< 'mysql-apt-config mysql-apt-config/select-tools select MySQL Server (Currently selected: mysql-5.7)' | |
debconf-set-selections <<< "mysql-apt-config mysql-apt-config/select-preview select mysql-5.7" | |
debconf-set-selections <<< "mysql-apt-config mysql-apt-config/select-server select mysql-5.7" | |
debconf-set-selections <<< "mysql-apt-config mysql-apt-config/select-product select Ok" | |
debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' | |
debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' |
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
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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
mogrify -path ./branded -format png -draw 'image over 400,2200 1850,203.34 "./logo.png"' * |
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
<?php | |
class TicTacToe { | |
/** | |
* Board for the game | |
* @var array | |
*/ | |
private $board = []; | |
/** |
OlderNewer