Skip to content

Instantly share code, notes, and snippets.

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

Arthur Barros arthurbarros

🏠
Working from home
View GitHub Profile
@arthurbarros
arthurbarros / gist:5266720
Last active December 15, 2015 13:19
[solved] javascript: strange behavior // The problem that was that concat() dosen't change the value of the array, it returns the two arrays joined
function Foo(){
this.baz = [];
this.set = function(bar){
this.baz = this.baz.join(bar);
return this;
}
}
foo = new Foo();
foo.set({'a':123}).set({'b':321});
@arthurbarros
arthurbarros / btce.js
Last active April 28, 2017 18:17
PoC: how your wallet reacts on panic buy/sell on litecoin currency
var WebSocket = require('ws'),
Entities = require('html-entities').XmlEntities,
http = require('https');
var TransportHelper = function(){}
TransportHelper.prototype.parse = function(data)
{
data = JSON.parse(JSON.parse(data).data);
if(typeof data == 'string'){
@arthurbarros
arthurbarros / fibodoge.dogescript
Last active August 29, 2015 13:57
Fibonnaci for DOGESCRIPT ( http://zachbruggeman.me/dogescript/ ) much appreciate, wow.
shh THIS IS FIBODOGE SUCH WOW
quiet
fibodoge was created with dogescript by arthurbarros at github
such appreciate, much thanks, wow
loud
such fibodoge much number
rly number bigger 2
doge is 1
@arthurbarros
arthurbarros / wa.py
Created October 13, 2014 13:43
Extracting WhatsApp passwords
# -*- coding: utf-8 -*-
from path import path
import paramiko
import os, sys, time
def find_between( s, first, last ):
try:
start = s.index( first ) + len( first )
end = s.index( last, start )
return s[start:end]
@arthurbarros
arthurbarros / robot_pong.py
Created October 14, 2014 14:08
Robot Pong
import sys
import socket
import string
HOST="irc.freenode.net"
PORT=6667
NICK="SuperAwesomeNickForARobot"
IDENT="thatawesomenick"
REALNAME="AwesomeRobot"
CHANNEL = "#MyAwesomeRobotChannel"
@arthurbarros
arthurbarros / folha.py
Last active August 29, 2015 14:18
Solução para o problema proposto em http://hotsites.folha.com.br/2015/03/31/selecao/
import string
def words_product(word):
words = string.ascii_uppercase
multiplier = 1
for letter in word.upper():
multiplier *= words.index(letter) + 1
return multiplier % 45
@arthurbarros
arthurbarros / gist:b23dad4dad134449d4c0
Created September 29, 2015 19:22
get your sh!t together man
git rm $(git ls-files --deleted)
@arthurbarros
arthurbarros / commands.sh
Created October 17, 2015 15:41
Commands to create a RetroPie on a Mac OS X
diskutil list
diskutil unmountdisk diskN
sudo dd if=retropie-v3.1-rpi1.img of=/dev/rdisk3 bs=1m
@arthurbarros
arthurbarros / almost_duplicated.py
Created October 22, 2015 19:50
Find almost duplicated roms
import glob,os,pdb,time
class File_:
def __init__(self,name_,codes_,codeLength_,shortName_):
self.name=name_
self.codes=codes_
self.codeLength=codeLength_
self.shortName=shortName_
[
/* @ EMPTY WINDOW
* Style for empty (no tabs) window
========================================================================= */
{
"class": "sheet_container_control",
"layer0.tint": [37, 43, 57],
"layer0.opacity": 1.0