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
#On Ubuntu, put this in the end of ~/.bashrc file | |
# Displays the current git branch name and the dirty state in your Bash shell | |
# prompt. Add a line like this to your ~/.bashrc file: | |
# | |
# . ~/path/to/gist/bash-git-prompt | |
# | |
# To use this, you must enable "enable programmable completion features". | |
# Look at your ~/.bashrc for something like: | |
# |
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 | |
#reference: http://www.mysysad.com/2008/01/ftp-using-shell-script.html | |
REMOTE='esoft' | |
USER='anyuser' | |
PASSWORD='myftp125' | |
FTPLOG='/tmp/ftplog' | |
date >> $FTPLOG |
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 | |
# http://www.pomodorotechnique.com/ | |
#Icones: | |
#/usr/share/icons/hicolor/48x48/apps/typing-monitor.png | |
#/usr/share/icons/hicolor/48x48/apps/evolution-tasks.png | |
#Requisitos: | |
#sudo apt-get install beep |
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
=begin | |
Requisitos Minimos para rodar este script: | |
#jruby 1.1 ou superior (nao testei com superior :D) | |
apt-get install jruby | |
#baixar o oracle jdbc (para o 10g, ou procure a versão que deseje) de: | |
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_10201.html | |
#copiar o ojdbc14.jar para (usar sudo): |
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/ruby -w | |
# | |
# tdg - Thread Dump Grapher (any better name?) | |
# | |
# Given a Java Thread Dump file as argument, it prints out | |
# a Grapviz (.dot) to generate a graph that shows which threads | |
# are waiting on others for a lock. | |
# (tested with a Sun JDK 1.4 thread dump) | |
# | |
# from: http://neuroning.com/2005/11/24/graphical-thread-dumps |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Cheat Sheet Gedit Snippets</title> | |
<style> | |
span { | |
border-bottom: 1px solid; | |
text-align: center; | |
font-size: 3em; |
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 | |
# Install Monaco font in Linux | |
# Version from nullvideo https://gist.github.com/rogerleite/99819#gistcomment-2799386 | |
sudo mkdir -p /usr/share/fonts/truetype/ttf-monaco && \ | |
sudo wget https://gist.github.com/rogerleite/b50866eb7f7b5950da01ae8927c5bd61/raw/862b6c9437f534d5899e4e68d60f9bf22f356312/mfont.ttf -O - > \ | |
/usr/share/fonts/truetype/ttf-monaco/Monaco_Linux.ttf && \ | |
sudo fc-cache |
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
@business_words = ['Sinergia','Mentalidade','Agregar','Mercado','E-mail','Follow up','Clientes','Benefício','Parceiros','Estratégia','Sistema','Rendimento','Pró-ativo','Business','Custos','Otimização','Foco','Efetivamente','A nível de','Recursos','Resultados','Paradigma','Projeto','Implementação','Integrar'] | |
#puts @business_words | |
#puts '==========================================' | |
def generate_card number_words, number_columns | |
random_words = random_business_words number_words | |
card = [] | |
number_lines = (number_words / number_columns) |
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
#ARQUIVO: bkp_redmine.sh | |
#!/bin/sh | |
BACKUP_FOLDER=/home/minha_empresa/backup/redmine | |
DATE_BACKUP=`date +%Y%m%d` | |
DB_FILE_BKP="$BACKUP_FOLDER"/"$DATE_BACKUP"_redmine_db.gz | |
FILES_FOLDER_BKP="$BACKUP_FOLDER"/files | |
FILES_FILE_BKP="$BACKUP_FOLDER"/"$DATE_BACKUP"_redmine_files.gz |
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
require 'rexml/document' | |
include REXML | |
doc = Document.new( File.new('ex-query-hibernate.xml') ) | |
root = doc.root | |
root.each_element('//query') { |query| | |
name = query.elements['name'].text #vem um SEARCH_CLIENT | |
arr_temp = name.split('_').each { |n| |