Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Restoring a VW, apartment EDM club, letsgo powered paragliding

Barry Allard steakknife

💭
Restoring a VW, apartment EDM club, letsgo powered paragliding
View GitHub Profile
@steakknife
steakknife / JCETest.java
Last active Aug 29, 2015 — forked from pulkitsinghal/JCETest.java
Test if unlimited jurisdiction policy files are installed (Apple JDK6 OSX : true, Oracle JDK6,7,8: false)
View JCETest.java
import javax.crypto.Cipher;
public class JCETest {
public static void main(String[] args) throws Exception {
final int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES");
final boolean unlimited = (maxKeyLen == Integer.MAX_VALUE);
System.out.print("JCE max key length: ");
if (unlimited) {
System.out.print("unlimited");
} else {
System.out.print(maxKeyLen);
@steakknife
steakknife / -
Last active Aug 29, 2015 — forked from reklis/-
View -
-b
-cpuid
-disable_aslr
-gzalloc_mode
-gzalloc_noconsistency
-gzalloc_uf_mode
-gzalloc_wp
-interrupt_latency_assert_enable
-kernel_text_ps_4K
-l
View ssh-config-oldssh
# Sane security defaults for OSX 10.10 SSH clients that are still based on OpenSSH6.2_p2
# Currently your old OpenSSH installation only supports a subset of ciphers and key exchange algorithms.
# OSX Users: consider updating your openssh version -> https://mochtu.de/2015/01/07/updating-openssh-on-mac-os-x-10-10-yosemite/
# Explanation: http://mochtu.de/2015/01/06/securing-ssh-connections/
# Background information: https://stribika.github.io/2015/01/04/secure-secure-shell.html
# https://stribika.github.io/2015/01/04/secure-secure-shell.html
Host *
PasswordAuthentication no
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
View README.txt
create this file in /Library/LaunchDaemons/org.basho.riak.plist
run: sudo launchctl load -w /Library/LaunchDaemons/org.basho.riak.plist
riak ping to verify
@steakknife
steakknife / gist:2044899
Created Mar 15, 2012 — forked from ezmobius/gist:807334
Run this script on a mac osx box running 10.6 and you will get a luajit with batteries included and all the good libs
View gist:2044899
#!/bin/sh
install_home=/usr/local
if ! which cc
then
echo install command line tools for xcode (or a compiler), try again:
echo
echo ' https://developer.apple.com/downloads/'
echo
@steakknife
steakknife / to_boolean.rb
Created Apr 28, 2012 — forked from gmgent/to_bool.rb
a better to_boolean
View to_boolean.rb
module Kernel
def to_boolean(nil_value = nil)
value = self.is_a?(String) ? self.downcase : self
case value
when "off", "no", "n", "false", "f", "0", "-", false, 0, "negative"
false
when "on", "yes", "y", "true", "t", "1", "+", true, 1, "affirmative"
true
else
nil_value
@steakknife
steakknife / python3.rb
Created May 18, 2013 — forked from anonymous/python3.rb
brew formula for python 3.3.2
View python3.rb
require 'formula'
# Python3 is the new language standard, not just a new revision.
# It's somewhat incompatible with Python 2.x, therefore, the executable
# "python" will always point to the 2.x version which you can get by
# `brew install python`.
class Distribute < Formula
url 'https://pypi.python.org/packages/source/d/distribute/distribute-0.6.40.tar.gz'
sha1 '46654be10177014bbb502a4c516627173de67d15'
View resizer.sh
#!/bin/bash -e
# Make sure you have installed ImageMagick
# http://cactuslab.com/imagemagick/
# Ensure we're running in location of script.
cd "`dirname $0`"
for f in *; do
if [[ $f == *@3x* ]];
then
@steakknife
steakknife / LICENSE
Created May 21, 2017 — forked from sinisterchipmunk/LICENSE
tar, gzip, and untar files using ruby in memory without tempfiles
View LICENSE
Copyright (C) 2011 by Colin MacKenzie IV
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, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
@steakknife
steakknife / docker-ssl-cert-generate
Last active Oct 24, 2017 — forked from cameron/docker-ssl-cert-generate
Generate self-signed SSL certs for docker client <— HTTPS (verified!)—> daemon
View docker-ssl-cert-generate
#! /bin/bash
set -e
echo 01 > ca.srl
openssl genrsa -out ca-key.pem
cat << CNF > ca.cnf
req_extensions = v3_req
[ req ]
distinguished_name = req_distinguished_name