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 | |
# zmcreateusers | |
# Mass create zimbra accounts | |
# | |
# AUTHORS: Caio Corrêa, Thompson Alves | |
# LAST UPDATED: 2011/12/02 | |
# | |
# Version 1.2: Added the report at the ending | |
# Version 1.1: Added security check of alias and username |
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 | |
export ORACLE_HOME="/path/to/oracle/home" | |
export ORACLE_SID=SID | |
DB_BKPDIR="/path/to/backup/directory" | |
DMPNAME="bkp_$(date +%y%m%d).dmp" | |
TARNAME="bkp_$(date +%y%m%d).tar.bz2" | |
LOGNAME="bkp_$(date +%y%m%d).log" |
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 | |
# WARNING: Will if instance contains ';' in either tag key or value | |
# Will fix it later, maybe | |
id=$(curl -s http://169.254.169.254/latest/meta-data/instance-id) | |
az=$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone/) | |
region=${az%[a-z]} | |
IFS=$'\n' |
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 python3 | |
for i in list(range(1,101)): | |
if i % 5 and i % 3: | |
print(i) | |
else: | |
if not i % 3: | |
print("Fizz", end='') | |
if not i % 5: |
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
" vim: set ft=vim: | |
function! SSHconfigFolds() | |
let thisline = getline(v:lnum) | |
if match(thisline, '^## ') >= 0 | |
return ">2" | |
elseif match(thisline, '^# ') >= 0 | |
return ">1" | |
else | |
return "=" |
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/sh | |
# | |
# ansible-vault-merge: helper script for merging changes in ansible-vault file | |
# | |
PROGNAME=$(basename $0) | |
usage() { | |
cat <<EOF |
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 | |
### Using ImageMagick, slices an image in equal parts according to coordinates and column/row numbers | |
### Useful when slicing images from Print and Play games to later feed to Online Print services | |
# This is super badly written. Will revise later | |
function help() { | |
echo | |
echo "$(basename $0) -h INT -w INT -H INT -V INT -c INT -r INT -i FILE/DIR -o DIR [-f FILE]" | |
echo "$(basename $0) -C INTxINT+INT+INT -c INT -r INT -i FILE/DIR -o DIR [-f 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
" vim: set ft=vim: | |
function! SSHconfigFolds() | |
let thisline = getline(v:lnum) | |
if match(thisline, '^## ') >= 0 | |
return ">2" | |
elseif match(thisline, '^# ') >= 0 | |
return ">1" | |
else | |
return "=" |
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
ATCO: TAM3800 on the ground at 00 leave the runway by the taxiway Foxtrot maintain position and contact ground on frequency 121.8. | |
Pilot 1: Roger leaving the runway by the taxiway Foxtrot and contact ground on frequency 121.8. | |
Pilot 2: Brasília TWR TUS9037 on final, landing gear down and locked | |
ATCO: TUS9037 cleared to land RWY 11L wind 150 degrees 5 knots. | |
Pilot 2: TUS9037 roger, cleared to land. |
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
# Cada execução retorna 50 items, quero uma lista com todos os | |
# items que tiverem um filtro no "campo" name do item | |
lc_filter = "filter" | |
lc_list = asg_conn.get_all_launch_configurations() | |
while true: | |
lc_subset = asg_conn.get_all_launch_configurations(next_token=lc_list[-1].name) | |
if len(lc_subset) == 0: |
NewerOlder