Skip to content

Instantly share code, notes, and snippets.

View igordcsouza's full-sized avatar
🏠
Working from home

Igor Souza igordcsouza

🏠
Working from home
View GitHub Profile
@igordcsouza
igordcsouza / bubble-sort.lisp
Last active March 18, 2016 13:10
Bubble sort em lisp utilizando recursividade!
(defun change(lat x)
(setq Aux (nth x lat))
(setf (nth x lat) (nth (+ 1 x) lat))
(setf (nth (+ 1 x) lat) Aux))
(defun bubble(lat x y)
(if(= x (length lat))
(print lat)
(cond((< y (length lat))
(cond((not (null (nth (+ 1 y) lat)))
package ordenanomeidade;
import java.util.Scanner;
public class OrdenaNomeIdade {
private static final int TAMANHO = 10;
public static void main(String[] args) {
String nome[] = new String[TAMANHO];
int idade[] = new int[TAMANHO];
int menu = 0;
Scanner teclado = new Scanner(System.in);
#!/bin/sh
for i in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23
do
url="http://va05-idc.rnp.br/riotransfer/cederj/sistemas_comp/ead05025/Aula_0"
aula="/Aula_0"
format=".mp4"
wget $url$i$aula$i$format
done
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package calculadora;
import java.util.Scanner;
public class Calculadora {
load data local infile '/Users/isouza/Google Drive/2016_1/PBD/tpch_2_17_0/dbgen/005/customer.tbl' into table CUSTOMER fields terminated by '|' lines terminated by '\n';
load data local infile '/Users/isouza/Google Drive/2016_1/PBD/tpch_2_17_0/dbgen/005/nation.tbl' into table NATION fields terminated by '|' lines terminated by '\n';
load data local infile '/Users/isouza/Google Drive/2016_1/PBD/tpch_2_17_0/dbgen/005/part.tbl' into table PART fields terminated by '|' lines terminated by '\n';
load data local infile '/Users/isouza/Google Drive/2016_1/PBD/tpch_2_17_0/dbgen/005/region.tbl' into table REGION fields terminated by '|' lines terminated by '\n';
load data local infile '/Users/isouza/Google Drive/2016_1/PBD/tpch_2_17_0/dbgen/005/lineitem.tbl' into table LINEITEM fields terminated by '|' lines terminated by '\n';
load data local infile '/Users/isouza/Google Drive/2016_1/PBD/tpch_2_17_0/dbgen/005/orders.tbl' into table ORDERS fields terminated by '|' lines terminated by '\n';
load data local infile '/Users
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package br.uff.dw;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
elsif message.text.include? "test"
answers = Telegram::Bot::Types::ReplyKeyboardMarkup
.new(keyboard: [%w(/foo /bar)], one_time_keyboard: false)
bot.api.send_message(chat_id: message.chat.id, text: "How can i help you?", reply_markup: answers
end
# https://simpleror.wordpress.com/2009/03/15/q-q-w-w-x-r-s/
# https://core.telegram.org/bots/api#keyboardbutton
require 'telegram/bot'
require 'swgem'
token = ''
Telegram::Bot::Client.run(token) do |bot|
bot.listen do |message|
if message.text.include? ("/start")
bot.api.send_message(chat_id: message.chat.id, text: "How can i help u?")
bot.api.send_message(chat_id: message.chat.id, text: "If u need, just do /help")
@igordcsouza
igordcsouza / ansible-variable-precedence.md
Last active September 26, 2018 11:04
Ansible variable precedence from most to least important!
alias terraform='docker run -it -v $(pwd):/app/ -v /home/$(id -un)/.ssh:/.ssh -v /home/$(id -un)/.gitconfig:/etc/gitconfig -v /home/$(id -un)/.ssh/:/root/.ssh/ -v /home/$(id -un)/tf-modules/:/app/tf-modules/ -w /app/ -e AWS_ACCESS_KEY_ID=$MY_AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$MY_AWS_SECRET_ACCESS_KEY hashicorp/terraform:0.12.4'