Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
require 'nokogiri'
require 'open-uri'
require 'progressbar'
def parse_url(url, formats)
response = open(url, 'User-Agent' => 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1;Trident/5.0)')
page = Nokogiri.parse(response.read)
links = page.css('a')
@tzudot
tzudot / stuns
Last active August 29, 2015 14:02 — forked from zziuni/stuns
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun.ekiga.net
stun.ideasip.com
# it is forked from https://github.com/xijo/reverse-markdown/blob/master/reverse_markdown.rb
require 'rexml/document'
require 'benchmark'
include REXML
include Benchmark
class ReverseMarkdown
# set basic variables:
# - @li_counter: numbering list item (li) tags in an ordered list (ol)
@tzudot
tzudot / mandelbrot.sql
Last active August 29, 2015 14:25 — forked from rupey/mandelbrot.sql
Mandelbrot plot in postgres
WITH RECURSIVE
x(i) AS ( VALUES (0)
UNION ALL SELECT i + 1
FROM x
WHERE i < 101),
Z(Ix, Iy, Cx, Cy, X, Y, I) AS (
SELECT
Ix,
Iy,
X :: FLOAT,
2015-07-26 18:17:37 -0400
./configure
--disable-dependency-tracking
--disable-silent-rules
--prefix=/usr/local/Cellar/wireshark/1.12.6
--with-gnutls
--disable-gtktest
--with-qt
2015-07-22 07:59:40 -0700
./configure
--prefix=/usr/local/Cellar/wget/1.16.3
--sysconfdir=/usr/local/etc
--with-ssl=openssl
--with-libssl-prefix=/usr/local/opt/openssl
--disable-debug
--disable-iri
--disable-pcre
@tzudot
tzudot / lit.rb
Last active August 29, 2015 14:26 — forked from creationix/lit.rb
Homebrew
require "formula"
class Lit < Formula
homepage "https://github.com/luvit/lit"
url "https://lit.luvit.io/packages/luvit/lit/v2.1.11.zip"
sha1 "be0904957a4867bf1284d0ebd7b04e6ec521b85a"
depends_on "luvi" => :build
def install
2015-08-05 13:22:58 -0400
luvi
/private/tmp/lit20150805-7638-1sd25d2
--
make
lit version: 2.2.4
luvi version: fatal: Not a git repository (or any of the parent directories): .git
command: make
2015-08-09 11:10:06 -0400
./configure
--disable-dependency-tracking
--disable-silent-rules
--prefix=/usr/local/Cellar/gnuplot/5.0.1
--with-readline=/usr/local/opt/readline
--with-gd=/usr/local/opt/gd
--disable-wxwidgets
--without-cairo
2015-08-10 11:40:01 -0400
./configure
--disable-dependency-tracking
--disable-silent-rules
--prefix=/usr/local/Cellar/gnuplot/5.0.1
--with-readline=/usr/local/opt/readline
--with-gd=/usr/local/opt/gd
--disable-wxwidgets
--without-cairo