This file contains 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
<?php | |
$cert = openssl_x509_parse("-----BEGIN CERTIFICATE----- | |
MIIEpDCCA4ygAwIBAgIJAJzu8r6u6eBcMA0GCSqGSIb3DQEBBQUAMIHDMQswCQYD | |
VQQGEwJERTEcMBoGA1UECAwTTm9yZHJoZWluLVdlc3RmYWxlbjEQMA4GA1UEBwwH | |
S8ODwrZsbjEUMBIGA1UECgwLU2VrdGlvbkVpbnMxHzAdBgNVBAsMFk1hbGljaW91 | |
cyBDZXJ0IFNlY3Rpb24xITAfBgNVBAMMGG1hbGljaW91cy5zZWt0aW9uZWlucy5k | |
ZTEqMCgGCSqGSIb3DQEJARYbc3RlZmFuLmVzc2VyQHNla3Rpb25laW5zLmRlMHUY | |
ZDE5NzAwMTAxMDAwMDAwWgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | |
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
This file contains 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
<?php | |
function aes_decrypt($code, $key, $iv) { | |
$mode = MCRYPT_MODE_CBC; | |
$enc = MCRYPT_RIJNDAEL_128; | |
return mcrypt_decrypt($enc, $key, $code, $mode, $iv); | |
} | |
function aes_encrypt($code, $key, $iv) { | |
$mode = MCRYPT_MODE_CBC; | |
$enc = MCRYPT_RIJNDAEL_128; |
This file contains 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
#!/usr/bin/perl -w | |
# | |
# Copyright (c) 2002-2005 David Rudie | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# 1. Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. |
This file contains 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
#!/bin/bash | |
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig:/Library/Frameworks/Mono.framework/Versions/3.2.3/lib/pkgconfig |
This file contains 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
<?php | |
// Javascript/HTML hex encode | |
function encode($input) | |
{ | |
$temp = ''; | |
$length = strlen($input); | |
for($i = 0; $i < $length; $i++) | |
$temp .= '%' . bin2hex($input[$i]); | |
return $temp; | |
} |
This file contains 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
# Colors | |
DARK_PURPLE="\[\033[1;34m\]" | |
GREEN="\[\033[0;32m\]" | |
GREY="\[\033[1;30m\]" | |
NORMAL="\[\033[0m\]" | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
# Git shortcuts | |
alias gci='git commit' |
This file contains 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
#!/bin/bash | |
# http://stackoverflow.com/questions/424071/list-all-the-files-for-a-commit-in-git | |
git diff-tree --no-commit-id --name-only -r $1 |
This file contains 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
# How to assemble raid device | |
mdadm --create --verbose /dev/md128 --level=1 --raid-devices=2 /dev/xvdm /dev/xvdn | |
# Make file system | |
mkfs -t xfs /dev/md128 | |
# How to re-assemble | |
mdadm --assemble --verbose /dev/md128 /dev/xvdm /dev/xvdn | |
# Get UUID |
This file contains 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
#!/bin/bash | |
find $1 -size $2c -delete |
This file contains 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
git submodule foreach --recursive git checkout master |