Skip to content

Instantly share code, notes, and snippets.

View powellnathanj's full-sized avatar

Nathan Powell powellnathanj

  • nathanpowell.org
  • PA
View GitHub Profile
@powellnathanj
powellnathanj / SSLPoke.java
Last active August 26, 2022 20:07 — forked from 4ndrej/SSLPoke.java
Test of java SSL / keystore / cert setup. Check the comment #1 for howto.
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
public class SSLPoke {
public static void main(String[] args) {
if (args.length != 2) {
System.out.println("Usage: "+SSLPoke.class.getName()+" <host> <port>");
System.exit(1);
@powellnathanj
powellnathanj / puppetdb-curl.sh
Created August 12, 2016 14:45 — forked from marshyski/puppetdb-curl.sh
Puppet DB Curl Examples
curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["node", "active"], true]'
curl -sf 'http://localhost:8080/v3/facts'
curl -sf 'http://localhost:8080/v3/nodes'
curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["fact", "kernel"], "Linux"]'
curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["fa, "operatingsystem"], "windows"]'
[root@cramp ~]# cat wtf.rb
#!/usr/bin/ruby
why_the_fuck_not = 'srsly'
def wut(something)
puts why_the_fuck_not
end
wut "heh"
// Before vim-javascript
method(arg1, arg2,
arg3);
// After vim-javascript
method(arg1, arg2,
arg3);
// After (Not sure I like this)
>> def select_big(ar)
>> ar.select{|n| n > 2}
>> end
>> select_big([1, 2, 3])
=> [3]
Or you could duck punch it, and re-open Array. Not as succinct as Clojure tho, ur rite there.
FUCK YOU JOSH