Skip to content

Instantly share code, notes, and snippets.

View ramayac's full-sized avatar
Code forward!

ramayac ramayac

Code forward!
View GitHub Profile
@ramayac
ramayac / vimeo-channel-pages.js
Last active December 17, 2015 20:29
"One liner" para obtener la lista de videos de la p'agina que estas viendo en Vimeo.
document.querySelectorAll("li a[title]").forEach(function(entry){ console.log(entry.href); });
https://vimeo.com/channels/natureofcode/58388167
https://vimeo.com/channels/natureofcode/58391447
https://vimeo.com/channels/natureofcode/58400734
https://vimeo.com/channels/natureofcode/58489018
https://vimeo.com/channels/natureofcode/58490313
https://vimeo.com/channels/natureofcode/58492076
https://vimeo.com/channels/natureofcode/58734251
https://vimeo.com/channels/natureofcode/58943395
https://vimeo.com/channels/natureofcode/58943394
https://vimeo.com/channels/natureofcode/58943396
@ramayac
ramayac / gist:5701156
Created June 3, 2013 20:33
A quick reminder of PHP built in web server.
PHP 5.4.0 built-in web server:
cd ~/public_html
php -S localhost:8000
Done!
@ramayac
ramayac / DitherExample.pde
Created August 13, 2013 21:18
Image Dither algorithm
//Image Dithering
//http://www.processing.org/discourse/beta/num_1203512880.html
PImage ditherImage(PImage img) {
PImage ditheredImg = img.get(0, 0, img.width, img.height);
// tile = 2*2 pixels
int[] tilePixelColors = new int[4];
float[] bias = new float[] {
0.25, .75, 0.5, 0.0
/*
Algoritmo de implementación de dither de Floyd-Steinberg
http://en.wikipedia.org/wiki/Dither
http://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dithering
http://www.efg2.com/Lab/Library/ImageProcessing/DHALF.TXT
http://processing.org/discourse/beta/num_1264007943.html
*/
PImage b, source;
int levels = 1;
@ramayac
ramayac / hngen.py
Created December 12, 2013 16:13 — forked from grantslatton/hngen.py
import urllib2
import re
import sys
from collections import defaultdict
from random import random
"""
PLEASE DO NOT RUN THIS QUOTED CODE FOR THE SAKE OF daemonology's SERVER, IT IS
NOT MY SERVER AND I FEEL BAD FOR ABUSING IT. JUST GET THE RESULTS OF THE
CRAWL HERE: http://pastebin.com/raw.php?i=nqpsnTtW AND SAVE THEM TO "archive.txt"
@ramayac
ramayac / gist:8308800
Created January 7, 2014 23:24
Outline
<!DOCTYPE html>
<html>
<head>
<title>Llenar persona</title>
<!--meta name="og:url" content="http://stackoverflow.com/questions/15474306/nesting-an-svg-inside-a-div"/-->
<script type="text/javascript">
</script>
<style type="text/css">
#container {
@ramayac
ramayac / Grep.java
Last active August 28, 2024 18:07
Simple and personal implementation for making Grep on zip files in a folder, this is specialy useful for massive log searches. I'm trying to keep it in a single file (yes, it's on purpose!!! and smaller than 1000 loc).
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.RandomAccessFile;
@ramayac
ramayac / speedReader.pde
Created February 28, 2014 22:43
A simple clone of http://spreeder.com/index.php made in processing with drag & drop support.
/*
Primera version 0.1 28/Feb/2014
Segunda version 0.2 28/Feb/2014
@author ramayac
*/
import sojamo.drop.*;
SDrop drop;
String[] palabras = null;
String palabraActual = "";
var elsalvador = {
"ahuachapan": {
label: "Ahuachapán",
municipios: {
"ahuachapan":"Ahuachapán",
"jujutla": "Jujutla",
"atiquizaya": "Atiquizaya",
"concepciondeataco":"Concepción de Ataco",
"elrefugio": "El Refugio",
"guaymango": "Guaymango",