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
#!/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
@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
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| |
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
<defs> | |
<query> | |
<class>org.example.entities.Client</class> | |
<name>SEARCH_CLIENT</name> | |
<descr>Alguma descrição desatualizada.</descr> | |
<filter> | |
<![CDATA[ | |
select id, column1, column2, column3 | |
from tabela_exemplo | |
where id = ? |
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 ruby | |
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
puts "You should install bundler with >= 1.10.3 version." | |
puts "* Current Ruby: #{`ruby -v`}" | |
puts "* Current Bundler: #{`gem list bundler`}" | |
puts "* Original Exception: \"#{e.message}\"" | |
exit 1 |
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
UNIT MACHINE ACTIVE SUB | |
api_v28.web.1.service 15499c5f.../10.21.2.149 active running | |
dashboard_v34.web.1.service c98d2f7c.../10.21.1.230 active running | |
deis-builder.service 15499c5f.../10.21.2.149 activating start-post | |
deis-cache.service c98d2f7c.../10.21.1.230 active running | |
deis-controller.service 15499c5f.../10.21.2.149 active running | |
deis-database.service 25992000.../10.21.1.229 active running | |
deis-logger.service 25992000.../10.21.1.229 active running | |
deis-logspout.service 15499c5f.../10.21.2.149 active running | |
deis-logspout.service 25992000.../10.21.1.229 active running |