Skip to content

Instantly share code, notes, and snippets.

@robfe
robfe / QrCodeElement.cs
Created November 9, 2011 22:20
WPF templated control for QrCode.codeplex.com
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using Gma.QrCodeNet.Encoding;
namespace Gma.QrCodeNet.Wpf
{
public class QrCodeElement : Control
@fancyremarker
fancyremarker / .bash_login.jenkins
Last active March 6, 2023 19:21
[A.] Scripts related to Jenkins client setup
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 2, 2024 03:13
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@smoser
smoser / debconf-get-selections
Created August 9, 2012 02:20
debconf-get-selections
#!/usr/bin/perl
#
# The goal of this is to read a bunch of variables from debconf
# To implement a "late_command_runparts" like function.
# Ie, you would populate the preseed with content like:
# late-command-d late-command/90-fix-hosts string content-for-fix-hosts
# late-command-d late-command/10-install-my-packages string payload
#
# Then, in the actual late_command, we would suck out all those
# values, and run them by doing something like this:
@jedy
jedy / go_scp.go
Last active May 31, 2022 07:20
an example of scp in golang
// https://blogs.oracle.com/janp/entry/how_the_scp_protocol_works
package main
import (
"fmt"
"golang.org/x/crypto/ssh"
)
const privateKey = `content of id_rsa`
@sgrankin
sgrankin / macvim.rb
Created February 6, 2013 00:55
Hombrew's macvim formula using brew-installed python and ruby
require 'formula'
class Macvim < Formula
homepage 'http://code.google.com/p/macvim/'
url 'https://github.com/b4winckler/macvim/tarball/snapshot-66'
version '7.3-66'
sha1 'd11696f7089688fa96a45fc57410c60f6ca5a394'
head 'https://github.com/b4winckler/macvim.git', :branch => 'master'
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 4, 2024 21:33
A badass list of frontend development resources I collected over time.
@AlainODea
AlainODea / hello.c
Last active March 16, 2016 09:00
Cross-compiler from x86_64 Linux to x86_64 Illumos on Ubuntu (works for Hello World and possibly more)
#include<stdio.h>
main()
{
printf("Hello World");
}
@anaisbetts
anaisbetts / gh_unsub.rb
Last active December 25, 2015 18:09
Unsubscribe from all repos that you have not contributed to
#!/usr/bin/env ruby
require 'octokit'
pass_re = /^password: "(.*)"$/
token = `security find-generic-password -s "GitHub API Token" -g 2>&1 | grep "password"`.match(pass_re)[1]
c = Octokit::Client.new(:access_token => token)
user_login = c.user.login
@jyap808
jyap808 / decrypt_gpg_armor.go
Created January 4, 2014 01:05
Decrypting an ASCII armored GPG encrypted string in Golang
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"code.google.com/p/go.crypto/openpgp/armor"
"fmt"
"io/ioutil"
"log"
)