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 | |
# | |
# Goal: Make backup of mysql databases for magento stores | |
# Created by: Samuel Maciel Sampaio [20120901] [20140321] | |
# Contact: samukasmk@gmail.com <smktecnologia.com.br> | |
# Needed Applications: | |
# - mysql | |
# - mysqldump | |
# - s3put |
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 | |
# | |
# By: Samuel Maciel Sampaio <samukasmk@gmail.com> [20140328] | |
# Defining Ruby's version by alternatives tool | |
# Set the ruby version you want to configure | |
RUBY_VERSION="1.8" | |
ALTERNATIVES_TOOL=$(which update-alternatives 2>/dev/null) |
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 | |
# | |
# script: deploy_kivy_app_with_kivy_launcher.sh | |
# | |
# by: Samuel Maciel Sampaio [20140717] | |
# | |
# contact: samukasmk@gmail.com | |
# | |
# goal: | |
# Develop kivy apps for android and quickly test directly in your |
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
-- by: Samuel Maciel Sampaio [2014-17-07] | |
-- contact: samukasmk@gmail.com | |
-- goal: call your specific command to the current session of the current terminal | |
-- Special Thanks to Stefan van den Oord, 2010-12-29 | |
-- and https://code.google.com/p/iterm2/wiki/AppleScript | |
tell application "iTerm" | |
activate | |
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 | |
echo "Opening Modified file: ($5) -> ($2)" | |
os_name=`uname -s` | |
case $os_name in | |
Darwin) opendiff "$2" "$5" > /dev/null 2>&1 | |
;; | |
*) meld "$2" "$5" > /dev/null 2>&1 | |
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
#!/bin/bash | |
# | |
# vagrant_aliases.sh | |
# By: Samuel Maciel Sampaio <samuel@smk.net.br> | |
# | |
# Installation instructions: | |
# | |
# 1.) put this file in folder /usr/bin with name 'v', eg: '/usr/bin/v' | |
# | |
# 2.) to exec vagrant snap or vagrant sandbox please install this plugins: |
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/python | |
# | |
# script: pymetter | |
# by: Samuel Maciel Sampaio [20150403] <samukasmk@gmail.com> | |
# goal: Test webpage with json content and calculate average elapsed time | |
# example of use: | |
# ./pymetter.py --url https://api.github.com/user \ | |
# --http-user 'your_github_username' \ | |
# --http-pass 'your_github_password' |
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
# Example of support for Data bag encrypted on Chef | |
# By: Samuel Maciel Sampaio <samukasmk@gmail.com> | |
# get data_bag obj | |
search("my_data_bag_name", "id:my_data_bag_item_name").each do |my_data_bag_obj| | |
# find for keys encrypted | |
key_found = my_data_bag_obj.keys.select{ |k| k != "id" }[0] | |
# if exists some key and its encrypted, reassing the data_bag obj |
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
###### Exemplos de uso de data com find: | |
# http://www.unix.com/shell-programming-and-scripting/39909-delete-file-older-than-n-days.html | |
"Yes, the 'find' has three options for number of days: | |
1) +n --> More than 'n' days ago. | |
2) -n --> Less than 'n' days ago. | |
3) n ---> Exactly 'n' days ago. | |
Thus, if you specify '+1', it means more than 1 day ago." | |
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 | |
# see: http://blog.tomtung.com/2009/11/cowsay-fortune | |
# http://www.commandlinefu.com/commands/view/3584/remove-color-codes-special-characters-with-sed | |
# https://github.com/busyloop/lolcat | |
# https://github.com/dorentus/mruby-lolcat-bin | |
# | |
# requires `fortune`, `cowsay`, | |
# and ruby gem `lolcat` or its mruby version equivalent | |
export LANG="en_US.UTF-8" |
OlderNewer