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 | |
PATH=$PATH:/usr/bin:/bin:/usr/local/bin | |
while [ "$1" != "" ]; do | |
case $1 in | |
-s ) shift | |
SEPARATOR=$1 | |
;; | |
* ) FILEPATH=$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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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
class FizzBuzz | |
attr_reader :lista | |
def initialize | |
@lista = 1..100 | |
end | |
def divisor_3_5 (numero) | |
if(numero%5 == 0 && numero%3 ==0) | |
"fizzbuzz" |
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
Remove osxfuse if installed via homebrew: | |
> brew uninstall osxfuse | |
Install osxfuse binary and choose to install the MacFUSE compatibility layer: | |
http://sourceforge.net/projects/osxfuse/files/latest/download?source=files | |
Reboot (optional but recommended by osxfuse) | |
Install ntfs-3g via homebrew: | |
> brew update && brew install ntfs-3g |
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
#config/secrets.yml | |
production: | |
secret_key_base: "173df1a20fb5d746d33695c5e22762a9fad1211d7321ad1cfa7c0ed53d540337" |
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 | |
set -e | |
for F in $(find . -size +900k) | |
do | |
FNAME=`basename $F` | |
mv "$F" "$F-orig" | |
echo -n "Converting ${FNAME}: " | |
convert -strip -quality 80 -resize "1024x768>" "$F-orig" "$F" | |
echo "done" |
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 | |
set -e | |
for F in $(find . -size +900k) | |
do | |
FNAME=`basename $F` | |
mv "$F" "$F-orig" | |
echo -n "Converting ${FNAME}: " | |
convert -strip -quality 80 -resize "1024x768>" "$F-orig" "$F" | |
echo "done" |
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
file = File.new("/Users/m3nd3s/Desktop/schedule.txt", 'r') | |
begin | |
report = File.open("/Users/m3nd3s/Desktop/report.txt", 'w') | |
while(line = file.gets) | |
cols = line.split(" - ") | |
utc_time = DateTime.parse(cols[0]) | |
br_time = utc_time.in_time_zone('Brasilia') |
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 | |
HOSTS=$(cat <<EOF | |
dev.adena.com.br | |
dev.acimaq.adena.com.br | |
EOF) | |
CMD="ls -lah /proc/\$(pidof java)/task | wc -l" | |
for H in $HOSTS |
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
# | |
# Diretiva http {} | |
# | |
http { | |
# ... | |
geo $developer { | |
default no; | |
#177.206.31.159/32 yes; # IP que terá liberação |
NewerOlder