Skip to content

Instantly share code, notes, and snippets.

View flash1293's full-sized avatar
🐿️
workin' on stuff

Joe Reuter flash1293

🐿️
workin' on stuff
View GitHub Profile
@flash1293
flash1293 / gist:7d3e9239c9d6158ec09f
Created December 4, 2014 06:28
base-conf for a web-app in a nginx-dockercontainer
server {
listen 80;
root /app;
index index.html index.htm;
server_name rmt;
error_page 404 /404.html;
}
@flash1293
flash1293 / gist:e7b7909958deeebf2159
Created December 4, 2014 14:53
alias für entwickeln mit grunt bower und npm in docker-container
alias dgrunt='docker run -it --rm -v $(pwd):/data dockerfile/nodejs-bower-grunt grunt'
alias dbower='docker run -it --rm -v $(pwd):/data dockerfile/nodejs-bower-grunt bower --allow-root'
alias dnpm='docker run -it --rm -v $(pwd):/data dockerfile/nodejs-bower-grunt npm'
@flash1293
flash1293 / gist:a18304ff41b2bbe358ad
Created December 24, 2014 13:11
nexus deployment über API
curl -v -F r=snapshots -F hasPom=false -F e=gz -F g=de.flash1293 -F a=rmt -F v=1.0 -F p=gz -F file=@rmt.tar.gz -u admin:<PASSWORT> http://nexus.flash1293.de/service/local/artifact/maven/content
@flash1293
flash1293 / gist:40bc66893294fabb4fd8
Created January 19, 2015 13:30
Get a terminal in a container
docker exec -i -t wia_web_1 bash
@flash1293
flash1293 / gist:f3e156bcafde241f9efd
Created September 22, 2015 07:35
Temporary forwarding mail-server
docker run -p 25:25 --name postfix -d catatnight/postfix
docker exec -it postfix bash
apt-get install postfix-pcre
in /etc/postfix/main.cf
correct myhostname
smtpd_relay_restrictions = check_relay_domains
relay_domains = *list of accepting hosts*
@flash1293
flash1293 / gist:8aa0a6535f26a825f2bb
Created September 22, 2015 12:09
Creating ssl certificate
openssl req -x509 -nodes -newkey rsa:2048 -keyout logstash-forwarder.key -out logstash-forwarder.crt
@flash1293
flash1293 / install.sh
Last active October 25, 2016 06:02
Homebrew install-script
#!/bin/bash
brew tap caskroom/cask
brew install caskroom/cask/brew-cask
brew cask install google-chrome
brew cask install atom
brew cask install dockertoolbox
brew cask install firefox
brew cask install sourcetree
brew cask install google-drive
docker-machine create -d "virtualbox" default
@flash1293
flash1293 / README.md
Last active October 12, 2018 18:40
Enable/disable ssh SOCKS proxy tunnel on mac

To create a SOCKS proxy which tunnels all of your traffic through ssh, you have to go to System preferences > Network > Wi-fi > Proxies > SOCKS-Proxy

Here enter localhost as host and 8080 as port. Don't enable the checkbox, at SOCKS-Proxy, the script takes care of that.

Create the file tunnel.sh and make it executable (chmod +x tunnel.sh). To establish the connection, run ./tunnel.sh - now everything uses the ssh-tunnel. To kill it, press ctrl + C.

This is useful to hop on a trusted environment in public wifis.

var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render });
function preload() {
game.load.spritesheet('dude', 'assets/games/starstruck/dude.png', 32, 48);
game.load.image('background', 'assets/games/starstruck/background2.png');
game.load.spritesheet('tile', 'assets/games/starstruck/tiles-1.png', 32, 32);
}
@flash1293
flash1293 / cropAndSave.py
Created November 4, 2016 06:47
Python script for removing a white background, cropping the image and saving it to disk in python
#This script iterates over all open images, removes everything of the color white, crops the image and saves it to disk
#Usage: Filters > Python-Foo > Console
#Doc: here https://www.gimp.org/docs/python/ and here http://oldhome.schmorp.de/marc/pdb/
#To get an overview over available functions, help(gimp), help(gimp.pdb) and gimp.pdb.<SOME FUNCTION>.params is important
#Gotcha: run_mode-parameters are set from the system to non-interactive
#e.g. the plug_in_autocrop function advertises to have 3 parameter, but in reality has only two
BASE_PATH = '/path/to/target/folder'
FILE_EXTENSION = '.png'