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
/* | |
* "THE BEER-WARE LICENSE" (Revision 42): | |
* <[email protected]> wrote this file. As long as you retain this notice you | |
* can do whatever you want with this stuff. If we meet some day, and you think | |
* this stuff is worth it, you can buy me a beer in return | |
*/ | |
var int = parseInt, | |
sub = String.prototype.substr, | |
colors = { |
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
redis-cli -s /tmp/redis.sock set sptransCookie $(curl -sI olhovivo.sptrans.com.br | tr -d '\r' | sed -En 's/^Set-Cookie: ([^;]*).*$/\1/p')>/dev/null |
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
import java.util.Random; | |
import java.util.Scanner; | |
/** | |
* | |
* @author Allah | |
*/ | |
public class BatalhaNaval { | |
public static void main(String[] args) { |
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
user nginx www-data; | |
worker_processes 1; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 768; | |
} | |
http { | |
sendfile on; |
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
local sinatra = require('sinatra'); | |
local app = sinatra.app:new() | |
app:get("/", function() | |
return "Hello, World " | |
end) | |
app:get("/:name", function() | |
return "Hello, " .. params.name; |
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
-- ---------------------------------------------------------------------------- | |
-- "THE BEER-WARE LICENSE" (Revision 42): | |
-- <[email protected]> wrote this file. As long as you retain this notice you | |
-- can do whatever you want with this stuff. If we meet some day, and you think | |
-- this stuff is worth it, you can buy me a beer in return | |
-- ---------------------------------------------------------------------------- | |
local table, string = require [[table]], require [[string]] | |
local type, pairs, rawset, setmetatable, getmetatable = |
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
# apr (apache portable runtime) | |
wget http://ftp.unicamp.br/pub/apache//apr/apr-1.5.1.tar.gz | |
tar zxf apr-1.5.1.tar.gz | |
cd apr-1.5.1 | |
sudo ./configure | |
sudo make -j2 && sudo make install | |
cd .. | |
#apr-utils | |
wget http://archive.apache.org/dist/apr/apr-util-1.5.3.tar.gz |
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
sudo wget http://sphinxsearch.com/files/sphinx-2.1.8-release.tar.gz | |
sudo tar zxf sphinx-2.1.8-release.tar.gz | |
sudo wget http://snowball.tartarus.org/dist/libstemmer_c.tgz | |
sudo tar zxf libstemmer_c.tgz | |
sudo cp -fa libstemmer_c/* sphinx-2.1.8-release/libstemmer_c/ | |
cd sphinx-2.1.8-release | |
sudo ./configure --enable-id64 --with-libstemmer |
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
cd /opt | |
sudo wget http://www.openssl.org/source/openssl-0.9.8y.tar.gz | |
sudo tar zxf openssl-0.9.8y.tar.gz | |
sudo wget http://zlib.net/zlib-1.2.8.tar.gz | |
sudo tar zxf zlib-1.2.8.tar.gz | |
cd zlib-1.2.8 | |
sudo ./configure | |
sudo make -j4 && sudo make install && cd .. |
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
-- @xxleite under [BeerWare] license | |
local string, io = require [[string]], require [[io]] | |
local gmatch, format, byte, write = string.gmatch, string.format, string.byte, io.write | |
-- common accept(s) content | |
local charsets = { | |
'*', 'utf-8', 'utf-8, ISO-8859-1', 'utf-8;q=0.8, ISO-8859-1', |