Skip to content

Instantly share code, notes, and snippets.

@rjmcguire
rjmcguire / d_to_html.d
Created September 6, 2017 06:21 — forked from WebFreak001/d_to_html.d
Create websites using D, with a cool syntax
import std.conv;
import std.stdio;
import std.traits;
import std.range;
struct Element
{
string _name;
string[string] _attributes;
string _content;
@rjmcguire
rjmcguire / LICENSE
Last active March 13, 2017 06:48
striata-reader
Striata Reader End User Agreement <https://reader.striata.com/user-agreement.html>
This Agreement:
This Agreement between Striata and the end user covers all your use of the Striata Reader from any terminals where the Striata Reader has been installed, by the end user or by third parties. You accept this Agreement by installing the Striata Reader.
License:
Subject to the terms of this Agreement, Striata hereby grants you a limited, personal, non-commercial, non-exclusive, non-sub licensable, non-assignable, and free of charge license to download, install and use the Striata Reader on your computer for the sole purpose of personally using the Striata Reader to access your encrypted content.
No Granting of Rights to Third Parties:
You will not sell, assign, rent, lease, export, import, act as an intermediary or provider, or otherwise grant rights to third parties with regard to the Striata Software or any part thereof.
@rjmcguire
rjmcguire / PKGBUILD
Created March 3, 2017 15:06
terminix-build
# Maintainer: Rory McGuire <rjmcguire at gmail dot com>
# Contributor: Gerald Nunn <gerald dot b dot nunn at gmail dot com>
# Contributor: Davi da Silva Böger <dsboger at gmail dot com>
pkgname='terminix-build'
pkgdesc="A tiling terminal emulator based on GTK+ 3 (binary distribution)"
pkgver='1.5.0'
pkgrel=1
epoch=1
conflicts=('terminix')
@rjmcguire
rjmcguire / decrypt_gpg_armor.go
Created February 17, 2017 20:51 — forked from jyap808/decrypt_gpg_armor.go
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"
)
@rjmcguire
rjmcguire / encrypt_decrypt_gpg_armor.go
Created February 17, 2017 20:49 — forked from jyap808/encrypt_decrypt_gpg_armor.go
Symmetrically encrypting a string into ASCII armored GPG format and then Decrypting it 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"
)
# Maintainer: Rory McGuire <rjmcguire@gmail.com>
# Contributor: Mihails Strasunse <public@dicebot.lv>
# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Chris Brannon <cmbrannon79@gmail.com>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Anders Bergh <anders1@gmail.com>
# Contributor: Alexander Fehr <pizzapunk gmail com>
pkgname=('dmd' 'libphobos-devel' 'libphobos' 'dmd-devel-common')
pkgdesc="D programming language compiler and standard library"
@rjmcguire
rjmcguire / lockfree.d
Last active January 31, 2017 06:06
little lockfree size_t[size_t] map _experiments_
module lockfree;
import std.stdio;
import per_thread_id;
shared class Map(int SIZE) {
import core.atomic;
// maxContension: the number of times we allow our slot to be stolen from under us
bool set(size_t key, size_t value, ref size_t contended, size_t maxContension=3) {
import std.exception;
@rjmcguire
rjmcguire / renoise.md
Created January 19, 2017 08:09 — forked from pezz/renoise.md
How to use Renoise on a system without f*#$ing it over and doing your head in
@rjmcguire
rjmcguire / LICENSE.txt
Created December 14, 2016 01:04 — forked from jed/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@rjmcguire
rjmcguire / KeyLengthDetector.java
Created October 24, 2016 14:57 — forked from jehrhardt/KeyLengthDetector.java
Detect the allowed size of AES keys on the JVM. If the size is <= 256, it is limited. To fix it JCE unlimted stregth files are needed.
import javax.crypto.Cipher;
import java.security.NoSuchAlgorithmException;
public class KeyLengthDetector {
public static void main(String[] args) {
int allowedKeyLength = 0;
try {
allowedKeyLength = Cipher.getMaxAllowedKeyLength("AES");
} catch (NoSuchAlgorithmException e) {