Skip to content

Instantly share code, notes, and snippets.

View dukex's full-sized avatar
✔️
Verified Account

Duke dukex

✔️
Verified Account
View GitHub Profile
@dukex
dukex / gist:4463360f7a4ac997290b
Created April 12, 2015 04:47
AutoClicker Android Example infinite click
#!/bin/bash
c=1
while [ $c -le 1100 ]
do
$ANDROID_HOME/platform-tools/adb shell sendevent /dev/input/event1 3 57 18838
$ANDROID_HOME/platform-tools/adb shell sendevent /dev/input/event1 3 53 613
$ANDROID_HOME/platform-tools/adb shell sendevent /dev/input/event1 3 54 512
$ANDROID_HOME/platform-tools/adb shell sendevent /dev/input/event1 3 58 44
$ANDROID_HOME/platform-tools/adb shell sendevent /dev/input/event1 3 48 4
sudo add-apt-repository ppa:gnome3-team/gnome3-staging
sudo add-apt-repository ppa:gnome3-team/gnome3
sudo apt-add-repository ppa:cordova-ubuntu/ppa
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install gnome gnome-shell google-chrome-stable cordova-cli zsh git vim-gnome
# place this file in ~/.config/terminator/config
[global_config]
title_transmit_bg_color = "#d30102"
focus = system
[keybindings]
reset_clear = <Ctrl>R
new_tab = <Ctrl>T
split_horiz = <Ctrl><Shift>E
split_vert = <Ctrl>E
close_term = <Ctrl><Shift>W
@dukex
dukex / Makefile
Last active August 29, 2015 14:09 — forked from vitorbaptista/Makefile
# Baixa resultados do TSE desde 1989 e cria um CSV com os parlamentares eleitos com colunas:
# ano, uf, nome, cargo, situação, partido
ANOS_UF := 1989 1990
ANOS_MUNZONA := 1994 1996 1998 2000 2002 2004 2006 2008 2010 2012 2014
ARQUIVOS_UF := $(patsubst %, VOTACAO_CANDIDATO_UF_%.ZIP, $(ANOS_UF))
ARQUIVOS_MUNZONA := $(patsubst %, votacao_candidato_munzona_%.zip, $(ANOS_MUNZONA))
ARQUIVOS_MUNZONA_DEPENDENCIES := $(patsubst %, votacao_candidato_munzona_%_SP.txt, $(ANOS_MUNZONA))
ARQUIVOS_UF_DEPENDENCIES := $(patsubst %, VOTACAO_CANDIDATO_UF_%, $(ANOS_UF))
### Keybase proof
I hereby claim:
* I am dukex on github.
* I am dukex (https://keybase.io/dukex) on keybase.
* I have a public key whose fingerprint is D795 DD77 98F1 2DD8 0C8C B000 C326 7706 5124 BF2B
To claim this, I am signing this object:
package xpto
import (
"fmt"
"io/ioutil"
"net/http"
"net/http/httptest"
"strings"
"testing"
var removeSugestions = function(){
var x = document.querySelectorAll(".ego_x")
for(var i = 0; i < x.length; i++){
x[i].click()
}
var e = document.querySelectorAll("[name=xout_reason][value=not_interested]")
for(var j = 0; j< e.length; j++){
e[j].click()
}
@dukex
dukex / find.sh
Created December 3, 2013 01:13
#!/bin/bash
n=0
cat $1 | while read line; do
n=`expr $n + 1`
if [[ $line == *"$2"* ]] ; then
echo "LINHA $n: $line"
fi
done
var casper = require("casper").create(),
viewportSizes = [
[320,480],
[320,568],
[600,1024],
[1024,768],
[1280,800],
[1440,900]
],
url = casper.cli.args[0],