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 random | |
import os | |
import time | |
import json | |
def calculateSeed(): | |
return reduce(lambda x,y: x+y, map(int, list(str(11*((int(time.time()) << os.getpid()) >> int(time.time()/400000))/7)))) | |
class CodeGen(object): |
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
#include <iostream> | |
#include <highgui.h> | |
#include <opencv2/imgproc/imgproc.hpp> | |
using namespace std; | |
#define CAMERA_OUTPUT_WINDOW_NAME "camera-output" | |
int main(int argc, char **argv) | |
{ |
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
ZSH=$HOME/.oh-my-zsh | |
ZSH_THEME="pygmalion" | |
alias zshconfig="vim ~/.zshrc" | |
alias ohmyzsh="vim ~/.oh-my-zsh" | |
export UPDATE_ZSH_DAYS=14 | |
CASE_SENSITIVE="false" | |
DISABLE_AUTO_TITLE="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
set $(ifconfig | sed -En 's/inet[ \t\n\r\f\v]*([0-9.]+)[ \t\n\r\f\v]*netmask[ \t\n\r\f\v]*([a-zA-Z0-9.]+)[ \t\n\r\f\v]*broadcast[ \t\n\r\f\v]*([0-9.]+)[ \t\n\r\f\v]*$/ \1 \2 \3/p') && nmap -sP -PA22 $1/20 | sed -En 's/^Nmap scan report for ([a-zA-Z0-9.]+) [(]([0-9.]+)[)]$/\1|\2/p' |
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 ruby | |
require 'net/telnet' | |
def run_shell router | |
#r = router.cmd('help') | |
puts 'Welcome to router CLI' | |
print '> ' | |
loop do | |
cmd_txt = gets |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>job enqueue</title> | |
</head> | |
<body> | |
<p>Sistemator 3000</p> | |
<form action="app.php" method="POST"> | |
<label>Nombre del archivo</label><br> | |
<input type="text" name="name" value=""><br> |
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 sh | |
git clone https://github.com/itolosa/vimfiles.git ~/.vim | |
sh ~/.vim/install.sh | |
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh | |
pushd /tmp | |
git clone https://gist.github.com/7090980.git zs | |
cp zs/zshrc ~/.zshrc | |
rm -rf zs | |
popd | |
chsh -s /bin/zsh |
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 | |
# Version limpia del generador de: password-of-the-day | |
# ------------------------------------------------------------ | |
# El generador se trata de cifrado desplazado del seed inicial | |
# considerando el seed total un string infinito circular | |
# que en realidad es el mismo seed repetido infinitas veces. | |
# para esto se utiliza el modulo del largo del seed. (index % largo) | |
# | |
# Los desplazamientos que se utilizan para cada caracter |
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
//unfollow twitter | |
boxes = document.getElementsByClassName('ProfileCard-content'); | |
for (var i = 0; i < boxes.length; i++) { | |
box = boxes[i]; | |
try { | |
r = box.getElementsByClassName('FollowStatus')[0].innerHTML; | |
if (!(r === "te sigue")) { | |
throw "failed"; | |
} | |
} catch (err) { |
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 'selenium-webdriver' | |
require 'mechanize' | |
class LinkCrawler | |
def initialize | |
@driver = nil | |
end | |
def start | |
@driver = Selenium::WebDriver.for :firefox |
OlderNewer