Skip to content

Instantly share code, notes, and snippets.

Tony Ford tony4d

View GitHub Profile
@wuyongzheng
wuyongzheng / ECDH_BC.java
Last active Jun 12, 2020
Elliptic curve Diffie–Hellman using Bouncy Castle v1.50 example code
View ECDH_BC.java
import java.math.BigInteger;
import java.security.PublicKey;
import java.security.PrivateKey;
import java.security.KeyFactory;
import java.security.Security;
import java.security.KeyPairGenerator;
import java.security.KeyPair;
import java.security.SecureRandom;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.ECGenParameterSpec;
@justincampbell
justincampbell / after.sh
Created Mar 1, 2013
Jenkins + GitHub Commit Status API
View after.sh
if [[ $BUILD_STATUS == "success" ]]
then
export STATUS="success"
else
export STATUS="failure"
fi
curl "https://api.github.com/repos/justincampbell/my_repo/statuses/$GIT_COMMIT?access_token=abc123" \
-H "Content-Type: application/json" \
-X POST \
@jpfuentes2
jpfuentes2 / rbenv-install-system-wide.sh
Created Mar 8, 2012 — forked from lexusnexus/rbenv-install-system-wide.sh
CentOS: rbenv install and system wide install
View rbenv-install-system-wide.sh
#!/bin/bash
# CentOS rbenv system wide installation script
# Forked from https://gist.github.com/1237417
# Installs rbenv system wide on CentOS 5/6, also allows single user installs.
# Install pre-requirements
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \
make bzip2 autoconf automake libtool bison iconv-devel git-core
@lobster1234
lobster1234 / fabric_yammer.py
Created Apr 28, 2011
Fabric task to send build status to Yammer
View fabric_yammer.py
import oauth2 as oauth
import urllib
def yam():
consumer_key = YOUR_CONSUMER_KEY
consumer_secret= YOUR_CONSUMER_SECRET
access_token = YOUR_ACCESS_TOKEN
access_token_secret = YOUR_ACCESS_TOKEN_SECRET
consumer = oauth.Consumer(consumer_key, consumer_secret)
token = oauth.Token(access_token,access_token_secret)
client = oauth.Client(consumer,token)
You can’t perform that action at this time.