(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
package main | |
import ( | |
"github.com/guelfey/go.dbus" | |
"log" | |
"bufio" | |
"os" | |
) | |
func main() { |
#!/bin/bash | |
# | |
# Create an YUM reporistory from RPM with createrepo & repoview | |
# | |
# Repository options | |
REPO_PATH=/home/toto/public_html/rpms.toto.com/www | |
REPO_LIST="toto toto-testing" | |
DISTRO_LIST="el fedora" |
// Relatively painless magnet uri generation for torrentz.eu. Digging reveals | |
// that the torrent hash and id (torrentz.eu specific) are stored as hidden | |
// inputs for the comment system. All that's required is some Ajax and string | |
// parsing for the announce list and some html injection to add the link to | |
// the page. | |
// Get the torrent name, hash and id (for announce list lookup) | |
var name = $(".download>h2>span").first().text(); | |
var hash = $(':input[name="hash"]').first().val() | |
var torrent = $(':input[name="torrent"]').first().val() |
// Traverses an arbitrary struct and translates all stings it encounters | |
// | |
// I haven't seen an example for reflection traversing an arbitrary struct, so | |
// I want to share this with you. If you encounter any bugs or want to see | |
// another example please comment. | |
// | |
// The MIT License (MIT) | |
// | |
// Copyright (c) 2014 Heye Vöcking | |
// |
package main | |
// http://play.golang.org/p/fVf7duRtdH | |
import "fmt" | |
import "unicode/utf16" | |
import "unicode/utf8" | |
import "bytes" | |
func main() { |
func openbrowser(url string) { | |
var err error | |
switch runtime.GOOS { | |
case "linux": | |
err = exec.Command("xdg-open", url).Start() | |
case "windows": | |
err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start() | |
case "darwin": | |
err = exec.Command("open", url).Start() |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# Ruby is our language as asciidoctor is a ruby gem. | |
lang: ruby | |
before_install: | |
- sudo apt-get install pandoc | |
- gem install asciidoctor | |
script: | |
- make | |
after_success: | |
- .travis/push.sh | |
env: |
yahtzee@fagballs:~# tor --list-torrc-options | |
Aug 24 22:16:31.701 [notice] Tor v0.2.4.20 (git-0d50b03673670de6) running on Linux with Libevent 2.0.21-stable and OpenSSL 1.0.1f. | |
Aug 24 22:16:31.701 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning | |
AccountingMax | |
AccountingStart | |
Address | |
AllowDotExit | |
AllowInvalidNodes | |
AllowNonRFC953Hostnames | |
AllowSingleHopCircuits |
package main | |
import ( | |
"bytes" | |
"code.google.com/p/go.crypto/openpgp" | |
"encoding/base64" | |
"io/ioutil" | |
"log" | |
"os" | |
) |