Skip to content

Instantly share code, notes, and snippets.

View andresperezl's full-sized avatar

Andres Perez andresperezl

View GitHub Profile
@andresperezl
andresperezl / trackers-resolvs.rb
Last active September 5, 2018 02:03 — forked from anonymous/trackers-resolvs.rb
Little script that you feed a list of trackers and will eliminate the duplicates that point to the same IP addresses and try to group the trackers by domain name.
require 'uri'
require 'resolv'
text = File.open("trackers.txt").read.split(/\n|(\r\n)/)
hosts = text.map{ |uri| [URI(uri).host, uri] }.to_h
resolvs = {}
hosts.each do |h, uri|
if /\d+\.\d+\.\d+\.\d+/.match(h)
resolvs[h] = h
@andresperezl
andresperezl / Test.java
Last active October 20, 2015 19:46
Moving a circle with Processing and kinect
package core;
import processing.core.*;
import SimpleOpenNI.*;
public class Test extends PApplet {
SimpleOpenNI kinect;
int rectx = 240;
@andresperezl
andresperezl / .gitignore
Last active August 29, 2015 14:08
Android Studio .gitignore
# Created by https://www.gitignore.io
# Created with the parameters Android, Gradle, IntelliJ, Linux, Windows and OSX
# Creation URL for possible updates: https://www.gitignore.io/api/android,gradle,intellij,windows,linux,osx
### Android ###
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
@andresperezl
andresperezl / 2048.rb
Last active August 29, 2015 14:07
2048 CLI Ruby Version
#!/usr/bin/env ruby
module Game2048
class Matrix
attr_reader :squares
def initialize
@prng = Random.new
@did_move = false
@score = 0
@moves = 0