This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.crypto.Cipher; | |
| import javax.crypto.spec.SecretKeySpec; | |
| public class EncryptSample { | |
| private static final String KEY = "AB1C11111111111AAAAAAADDDDD11111"; | |
| private static final int PIN_LENGTH = 6; | |
| public static void main(String[] args) throws Exception { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package cz.monetplus.mnsp.tools.misc; | |
| import org.apache.commons.codec.DecoderException; | |
| import org.apache.commons.codec.binary.Hex; | |
| import org.apache.commons.lang.StringUtils; | |
| /** | |
| * Tools for encoding a decoding pinblock | |
| * | |
| * @author Tomas Jacko <tomas.jacko [at] monetplus.cz> |
Initialize a git repo in the current directory
# git init
Add a remote called "origin"
git remote add origin https://github.com/your-username-here/your-repo-here.git
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| chore: add Oyster build script | |
| docs: explain hat wobble | |
| feat: add beta sequence | |
| fix: remove broken confirmation message | |
| refactor: share logic between 4d3d3d3 and flarhgunnstow | |
| style: convert tabs to spaces | |
| test: ensure Tayne retains clothing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source. | |
| # Will include all hosts the playbook is run on. | |
| # Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html | |
| - name: "Build hosts file" | |
| lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present | |
| when: hostvars[item].ansible_default_ipv4.address is defined | |
| with_items: groups['all'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.net.ssl.SSLParameters; | |
| import javax.net.ssl.SSLSocket; | |
| import javax.net.ssl.SSLSocketFactory; | |
| import java.io.*; | |
| /** Establish a SSL connection to a host and port, writes a byte and | |
| * prints the response. See | |
| * http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services | |
| */ | |
| public class SSLPoke { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rabbitmqctl add_user test test | |
| rabbitmqctl set_user_tags test administrator | |
| rabbitmqctl set_permissions -p / test ".*" ".*" ".*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -module(mod_admin_cluster). | |
| -author('highlyunavailable@gmail.com'). | |
| -behaviour(gen_mod). | |
| -export([ | |
| join_cluster_as_master/1, | |
| join_cluster/1, | |
| leave_cluster/0, | |
| leave_cluster/1, |
NewerOlder