Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
>>>>>>>>> ⚠️ 💥 ☠️

Sergio Rubio rubiojr

🚀
>>>>>>>>> ⚠️ 💥 ☠️
View GitHub Profile
View gist:cfec3ed235918466b6ea277be41b61bb
diff --git a/internal/ui/inprogresslist/inprogresslist.go b/internal/ui/inprogresslist/inprogresslist.go
index d05f3b4..e25a0c8 100644
--- a/internal/ui/inprogresslist/inprogresslist.go
+++ b/internal/ui/inprogresslist/inprogresslist.go
@@ -57,7 +57,7 @@ func (i *InProgressList) isShown(tree *gtk.TreeView) {
func (i *InProgressList) updateFileList() {
//TODO: use leveldb to speed things up without walking the filesystem
- i.listBox.BindModel(nil, nil, nil)
+ i.listBox.BindModel(nil, nil)
View winpath.go
package main
import (
"fmt"
"net/url"
)
func main() {
u, _ := url.Parse(`file:///c:/go`)
fmt.Println(u.Path) // prints /c:/go
View encrypt.diff
diff --git a/cfg/config.go b/cfg/config.go
index e4fc20d..c278b9b 100644
--- a/cfg/config.go
+++ b/cfg/config.go
@@ -1,11 +1,14 @@
package cfg
import (
+ "bytes"
"encoding/json"
View keybase.md

Keybase proof

I hereby claim:

  • I am rubiojr on github.
  • I am rubiojr (https://keybase.io/rubiojr) on keybase.
  • I have a public key ASATFcCv4GiT5Lh_vwL85enlQm_V4oY0oBXjANWTKF-T5wo

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am rubiojr on github.
  • I am sergiorubio (https://keybase.io/sergiorubio) on keybase.
  • I have a public key ASBAMHqNzhinmUUsX-7JdZTnJy5VXmEt-B4TGc55FymXOwo

To claim this, I am signing this object:

View proxy.rb
#!/usr/bin/env ruby
# A quick and dirty implementation of an HTTP proxy server in Ruby
# because I did not want to install anything.
#
# Copyright (C) 2009-2014 Torsten Becker <torsten.becker@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
@rubiojr
rubiojr / gnome-keyring-query.c
Last active Aug 29, 2015
gnome-keyring-query.c
View gnome-keyring-query.c
// http://www.gentoo-wiki.info/HOWTO_Use_gnome-keyring_to_store_SSH_passphrases
// gcc gnome-keyring-query.c `pkg-config --cflags --libs gnome-keyring-1 glib-2.0` -o gnome-keyring-query
// https://github.com/rlaager/gnome-keyring-query-pkg
// also apt-get install libsecret-tools && secret-tool
#include <stdlib.h>
#include <stdio.h>
#include <glib.h>
#include "gnome-keyring.h"
@rubiojr
rubiojr / gnome_keyring.rb
Last active Aug 29, 2015
Read-only access to the GNOME keyring
View gnome_keyring.rb
#!/usr/bin/env ruby
require 'gir_ffi-gnome_keyring'
class Keyring
# Return all the keyring items
#
# returns: An Array of Hashes
#
def self.items
View chef-hog.rb
#!/usr/bin/env ruby
require 'time'
require 'pp'
RED = "\e[31m"
GREEN = "\e[32m"
YELLOW = "\e[33m"
CLEAR = "\e[0m"
BOLD = "\e[1m"
@rubiojr
rubiojr / otd-20130914.md
Last active Dec 23, 2015
One Tip a Day
View otd-20130914.md

VMware tools can't find Linux headers path in Saucy (13.10)

tags: vmware ubuntu saucy

apt-get install linux-headers
ln -s /usr/src/linux-headers-`uname -r`/include/generated/uapi/linux/version.h /usr/src/linux-headers-`uname -r`/include/linux/version.h

Then re-run the VMware tools installer