I hereby claim:
- I am mveytsman on github.
- I am mveytsman (https://keybase.io/mveytsman) on keybase.
- I have a public key whose fingerprint is 9C97 0545 A994 453D 4044 75C4 D773 5456 46C9 1E49
To claim this, I am signing this object:
## Usage: generate_ca.rb NAME | |
## | |
## This script generates an SSL CA certificate that can be used to sign | |
## other certificates. The certificate is saved to NAME.pem, and the | |
## key is saved to NAME.key | |
require 'openssl' | |
if ARGV.length != 1 | |
puts "Usage: generate_ca.rb NAME" |
## Usage: forge_cert.rb CA.pem CA.key target.pem | |
## | |
## Generate an SSL certificate signed by a custom CA with the same | |
## subject (common name, organization name, etc..) as the target cert. | |
## This is useful when you need to man-in-the-middle an ssl connection | |
## and want to use custom certificates with an existing tool or roll | |
## your own. | |
## | |
## Certificate is written to standard out in PEM format. |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
### Setup a wifi Access Point on Ubuntu 12.04 (or its derivatives). | |
### make sure that this script is executed from root | |
if [ $(whoami) != 'root' ] | |
then | |
echo " | |
This script should be executed as root or with sudo: | |
sudo $0 | |
" |
#!/usr/bin/env ruby | |
require 'thor' | |
class PhoneBookCLI < Thor | |
no_commands do | |
def wrap_errors(&block) | |
begin | |
instance_eval &block | |
rescue Exception => e | |
say "#{e.message}", :red | |
exit |
enum BinaryTree { | |
Node(int, Box<BinaryTree>, Box<BinaryTree>), | |
Leaf | |
} | |
fn insert(tree:Box<BinaryTree>, value:int) -> Box<BinaryTree> { | |
return box match (*tree) { | |
Leaf => Node(value, box Leaf, box Leaf), | |
Node(i, left, right) => if value < i { | |
Node(i, insert(left, value), right) |
(ns expression-problem) | |
;; Shapes have area | |
(defprotocol Areable | |
(area [this])) | |
;; We have circles | |
(defrecord Circle [radius]) | |
;; Circles have area |
(defn sierpinsky [n] | |
(if (= 0 n) | |
["*"] | |
(let [down (sierpinsky (- n 1)) | |
space (apply str (repeat (Math/pow 2 (- n 1)) " "))] | |
(concat (map #(apply str space % space) down) | |
(map #(clojure.string/join " " (repeat 2 %)) down))))) | |
(map println (sierpinsky 4)) |
@corbanbrook can you give an example of this for twitter? I.e. here's a sample json blob i got with http://localhost:5331/twitter/search?q=soundcloud
{
"hash_id":"d518910ce01b105fb4007b1dfb254b61",
"short_url":"",
"legacy":{
"asset_type":"",
#!/bin/sh | |
# This is a script that checks to see if the open ports on a host are what you expect them to be. | |
# If your firewall isn't doing what it's supposed to, it will post a message to Slack to alert you. | |
# Intended to be run as a cron job. | |
# | |
# Requires nmap to be installed | |
# | |
# Invoke as | |
# ./portscanyourself example.com 80 443 | |
# To alert you if any ports other than 80 and 443 are listening on a host |