Skip to content

Instantly share code, notes, and snippets.

View peter-mcconnell's full-sized avatar
🏴

Peter McConnell peter-mcconnell

🏴
View GitHub Profile
@peter-mcconnell
peter-mcconnell / policy.json
Created November 12, 2014 17:03
s3 - auto-readable files
{
"Version": "2008-10-17",
"Id": "Policy1377015142632",
"Statement": [
{
"Sid": "Stmt1377015001378",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
@peter-mcconnell
peter-mcconnell / lostdata.sh
Created November 12, 2014 09:25
lost git data
# Has your OS/FS/disk lost your data?
# cd to the directory containing your project repositories and run the command
# below. (It's long; make sure you get it all.) It finds all of your git repos
# and runs paranoid fscks in them to check their integrity.
(set -e && find . -type d -and -iname '.git' | while read p; do (cd "$(dirname "$p")" && (set -x && git fsck --full --strict)); done) && echo "OK"
# I have 81 git repos in my ~/proj directory and had no errors.
@peter-mcconnell
peter-mcconnell / tar.enc.sh
Created August 14, 2014 07:58
Tar Enc / Dec
tar cz folder_to_encrypt | openssl enc -aes-256-cbc -e > out.tar.gz.enc
openssl aes-256-cbc -d -in out.tar.gz.enc -out decrypted.tar.gz
@peter-mcconnell
peter-mcconnell / index.html
Created July 15, 2014 15:19
A Pen by Peter McConnell.
<div id="rect">
</div>
@peter-mcconnell
peter-mcconnell / cors.xml
Created May 22, 2014 12:39
S3 CORS all the things
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>Content-*</AllowedHeader>
<AllowedHeader>Host</AllowedHeader>
</CORSRule>
</CORSConfiguration>
@peter-mcconnell
peter-mcconnell / puppet.sh
Created April 30, 2014 16:38
puppet apply
puppet apply --modulepath=/modules /manifests/ --hiera_config=/etc/puppet/hiera.yaml --parser=future --verbose --debug
@peter-mcconnell
peter-mcconnell / gist:11298846
Created April 25, 2014 18:30
game jam art resources
[game art]
http://opengameart.org/
http://bagfullofwrong.co.uk/bagfullofwords/abuse-my-ip-make-games/
http://www.dumbmanex.com/bynd_freestuff.html
http://7soul1.deviantart.com/art/420-Pixel-Art-Icons-for-RPG-129892453
http://game-icons.net/
https://www.makegameswith.us/gamernews/277/20-best-free-art-resources-for-game-developers
@peter-mcconnell
peter-mcconnell / dockercmds.sh
Last active August 29, 2015 14:00
useful docker cmds
# delete dead images
for i in `sudo docker images|grep \<none\>|awk '{print $3}'`;do sudo docker rmi $i;done
# delete containers
sudo docker rm -f `sudo docker ps --no-trunc -a -q`
@peter-mcconnell
peter-mcconnell / nlb.pl
Created April 25, 2014 13:41
negative lookbehind with space
^(?!.*\bmandatory\b).*(?=\bpay\b).*$
#what mandatory fees do i have to pay [BAD]
#what fees do i have to pay [GOOD]
#what askjdha fees do i have to pay [GOOD]
#mandatory pay [BAD]
#mandatory pax [BAD]
nikto -h http://www.somewhere-that-im-allowed.com