Skip to content

Instantly share code, notes, and snippets.

t2d t2d

Block or report user

Report or block t2d

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View playbook.yml
---
- hosts: localhost
become: true
roles:
- ansible-nginx-slac
- base_goss
vars:
nginx_heading: Hello SLAC!
goss_test_directory: /etc/goss.d
View keybase
### Keybase proof
I hereby claim:
* I am t2d on github.
* I am t2d (https://keybase.io/t2d) on keybase.
* I have a public key ASAlP4lf_ybwwzRKStdQ-VGT9fEoDsdbgSnXKHRp68TF4wo
To claim this, I am signing this object:
@t2d
t2d / ansible-changeonly
Created Feb 22, 2017
Remove skipped lines from ansible output
View ansible-changeonly
#!/usr/bin/awk -f
# Remove skipped lines from ansible output
# Do only print plays and tasks with changes
#
# If you want to see warning:
# ansible-playbook site.yml 2>&1 | ansible-changeonly
#
# If you don't want to see warning:
# ansible-playbook site.yml 2>/dev/null | ansible-changeonly
#
View gist:253697ac898efc59eb273645b1c386ca
➜ iso git:(master) ✗ PACKER_LOG=1 packer build test.packer
2016/04/15 10:42:57 [INFO] Packer version: 0.10.0 0d4ee09ea5b0458d6e85a52ae82eb5add16bf6bb
2016/04/15 10:42:57 Packer Target OS/Arch: linux amd64
2016/04/15 10:42:57 Built with Go Version: go1.6
2016/04/15 10:42:57 [DEBUG] Discovered plugin: amazon-chroot = /usr/local/bin/packer-builder-amazon-chroot
2016/04/15 10:42:57 [DEBUG] Discovered plugin: amazon-ebs = /usr/local/bin/packer-builder-amazon-ebs
2016/04/15 10:42:57 [DEBUG] Discovered plugin: amazon-instance = /usr/local/bin/packer-builder-amazon-instance
2016/04/15 10:42:57 [DEBUG] Discovered plugin: digitalocean = /usr/local/bin/packer-builder-digitalocean
2016/04/15 10:42:57 [DEBUG] Discovered plugin: docker = /usr/local/bin/packer-builder-docker
2016/04/15 10:42:57 [DEBUG] Discovered plugin: file = /usr/local/bin/packer-builder-file
View cron.j2
#!/bin/sh
DATE=$(date --rfc-3339=date)
NAME=trusty-${DATE}
# create snapshot of each repo
{% for repo in aptly_mirrors %}
aptly mirror update {{ repo.name }}
aptly snapshot create {{ repo.name }}-${DATE} from mirror {{ repo.name }}
{% endfor %}
@t2d
t2d / magicmap.yml
Created Nov 13, 2014
Playbook for MagicMap in Vagrant
View magicmap.yml
---
- hosts: all
tasks:
- name: Set LC_ALL
lineinfile:
dest: /etc/environment
regexp: ^LC_ALL
line: LC_ALL="en_US.utf8"
View java7.yml
---
- name: ensure required packages are installed for Java 7
apt: name=$item state=latest update_cache=yes
with_items:
- python-software-properties
- name: Add Java repository to sources
action: apt_repository repo='ppa:webupd8team/java'
@t2d
t2d / Collision.java
Created Jun 25, 2013
Implementation of a Hash Collision with SHA512/t
View Collision.java
import java.security.NoSuchProviderException;
import java.security.Security;
import java.security.NoSuchAlgorithmException;
import java.util.HashMap;
import java.math.BigInteger;
import org.bouncycastle.crypto.Digest;
import org.bouncycastle.crypto.digests.SHA512tDigest;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
public class Collision {
@t2d
t2d / PaddingOracle.java
Last active Dec 18, 2015
Implementation of a Padding Oracle Attack in Java
View PaddingOracle.java
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
import java.net.URLConnection;
import org.apache.commons.codec.binary.Base64;
public class PaddingOracle {
You can’t perform that action at this time.