This file contains hidden or 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
Show hidden characters
{ | |
"ensure_newline_at_eof_on_save": true, | |
"fade_fold_buttons": false, | |
"font_size": 9, | |
"highlight_line": true, | |
"line_padding_bottom": 1, | |
"line_padding_top": 1, | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, | |
"trim_automatic_white_space": true, |
This file contains hidden or 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
class Pool | |
def initialize(size) | |
@size = size | |
@jobs = Queue.new | |
@pool = Array.new(@size) do |i| | |
Thread.new do | |
Thread.current[:id] = i | |
catch(:exit) do | |
loop do | |
job, args = @jobs.pop |
This file contains hidden or 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
# encoding: utf-8 | |
# autor: Rafael Polo | |
# data: 18.08.2013 | |
# Prova de Conceito: É possível utilizar os incríveis 1024 gigabytes de armazenamento de imagens | |
# do Flickr pra hospedar o valioso Acervo do MakingOff através de esteganografia ! | |
# Motivação: Usuários torrents têm sido preza fácil pra associações anti-pirataria. | |
# O Acervo hoje tem cerca de 18 TB de conteúdo distribuído, muitos já inacessíveis. | |
# Algumas contas no Flickr seriam suficientes pra distribuir todo conteúdo ainda acessível. |
This file contains hidden or 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 'rubygems' | |
require 'sanitize' | |
require 'mechanize' | |
URL = "http://www.desaparecidospoliticos.org.br" | |
browser = Mechanize.new | |
browser.user_agent_alias = 'Mac Safari' | |
puts "Listando..." | |
browser.get("#{URL}/pessoas.php?m=3") do |lista| | |
lista.search('//a[starts-with(@href, "pessoa.php?id=")]').each do |link| |
This file contains hidden or 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
#slides.carousel.slide | |
%ol.carousel-indicators | |
- i = 0 | |
- @noticias.each do |n| | |
- if i == 0 | |
%li.active{"data-slide-to" => i, "data-target" => "#slides"} | |
- else | |
%li{"data-slide-to" => i, "data-target" => "#slides"} | |
- i=+1 | |
.carousel-inner |
This file contains hidden or 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
class Ponto | |
... | |
before_save :detect_overgain | |
def detect_overgain | |
return false if Ponto.where(:identidade_id=>self.identidade.id).where('created_at > ?', 1.day.ago).where(:motivo=>self.motivo).count > 0 | |
end |
This file contains hidden or 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
#{@texto} | |
%hr | |
%span Mensagem enviada | |
%br | |
- if @atual.grupo? | |
%span= "pelo Grupo " | |
- else | |
%span= "por " | |
%span= link_to @atual.use_name, "/#{@atual.urlized}" |
This file contains hidden or 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
#encoding: utf-8 | |
namespace :minc do | |
desc "Crawleia Minc" | |
task :grab => :environment do | |
puts | |
puts "="*70 | |
puts "\t\t\t- Crawleando MinC -" | |
puts "\t\t\t"+Time.new.strftime("%Y-%m-%d %H:%M:%S") | |
puts "="*70 |
This file contains hidden or 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
apt-get update | |
apt-get upgrade | |
apt-get install autoconf automake bison build-essential curl cmake gcc git git-core htop libc6-dev libcurl4-openssl-dev libffi-dev libgdbm-dev libreadline-dev libreadline6 libreadline6-dev libsqlite3-0 libsqlite3-dev libssl-dev libtool libxml2 libxml2-dev libxslt-dev libyaml-dev locate make ncurses-dev nmap openjdk-9-jre openssl patch python-software-properties rubygems-integration ruby-bundler ruby2.3-dev ruby2.3 sqlite3 vim zlib1g zlib1g-dev software-properties-common mysql-server mysql-client libmysqlclient-dev libmagickwand-dev | |
sudo ln -s /usr/bin/ruby2.3 /usr/bin/ruby | |
sudo adduser git | |
mkdir /home/git/.ssh | |
chown -R git /home/git/ |
This file contains hidden or 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 python | |
#-*- coding: UTF-8 -*- | |
# | |
# mini_info.py v0.1 | |
# | |
# author: Rafael Polo | |
# updated on 20/05/09. | |
# | |
# [email protected] |