Skip to content

Instantly share code, notes, and snippets.

View dgv's full-sized avatar
🥑

Daniel Gomes Vargas dgv

🥑
View GitHub Profile
@dgv
dgv / gist:1593205
Created January 11, 2012 05:28
spark lines for your shell - spark of @holman in free pascal
{
spark lines for your shell - for free pascal
based: https://github.com/holman/spark
$Spark: spark.lpr,v 1.0 2012/01/03 14:11:02 dgvargas Exp $
}
program spark;
{$mode objfpc}{$H+}
@dgv
dgv / sample_wol.rb
Created June 4, 2012 02:05
Ruby Wake-On-Lan Script
#!/usr/bin/ruby
require 'socket'
begin
addr = ['<broadcast>', 9]
UDPSock = UDPSocket.new
UDPSock.setsockopt(Socket::SOL_SOCKET, Socket::SO_BROADCAST, true)
data = "\xFF\xFF\xFF\xFF\xFF\xFF"
arr = ARGV[0].split(':')
16.times do |i|
data<< arr[0].hex.chr+arr[1].hex.chr+arr[2].hex.chr+arr[3].hex.chr+arr[4].hex.chr+arr[5].hex.chr
@dgv
dgv / go-wol.go
Created October 29, 2012 22:03
Go Wake-On-Lan
package main
import (
"net"
"os"
"strings"
"encoding/hex"
"fmt"
)
@dgv
dgv / gravatar_img.go
Last active April 23, 2017 01:04
Gravatar image
// Gravatar image
// http://en.gravatar.com/site/implement/
// Run it: http://go-vim.appspot.com/p/oAsi0WvLlf
package main
import (
"crypto/md5"
"fmt"
"io"
"strings"
@dgv
dgv / rebuild_gae.sh
Created December 19, 2016 18:19
small script for google appengine golang sdk recompilation for other arch/os support
#!/bin/sh
if [ "$GAE_PATH" == "" ]; then
GAE_PATH=$HOME/go_appengine
end
if [ -d "$GAE_PATH" ]; then
echo "Google AppEngine SDK found!"
else
echo "Please download last AppEngine SDK (Go) and unpack on home dir or specify the location on GAE_PATH variable."
exit

Keybase proof

I hereby claim:

  • I am dgv on github.
  • I am dgv (https://keybase.io/dgv) on keybase.
  • I have a public key whose fingerprint is 73D6 28F7 00FB 2253 1299 876B B459 FC63 CBC4 109E

To claim this, I am signing this object: