Skip to content

Instantly share code, notes, and snippets.

View viktorsteinwand's full-sized avatar

Viktor Steinwand viktorsteinwand

View GitHub Profile

Keybase proof

I hereby claim:

  • I am viktorsteinwand on github.
  • I am viktorsteinwand (https://keybase.io/viktorsteinwand) on keybase.
  • I have a public key whose fingerprint is 8828 2E62 2617 18E1 06E1 ADF2 B0B7 0375 02D9 FB63

To claim this, I am signing this object:

@viktorsteinwand
viktorsteinwand / le-renew-webroot
Created May 30, 2016 11:17 — forked from thisismitch/le-renew-webroot
Let's Encrypt Auto-Renewal using the Webroot Plugin (Nginx)
#!/bin/bash
web_service='nginx'
config_file="/usr/local/etc/le-renew-webroot.ini"
le_path='/opt/letsencrypt'
exp_limit=30;
if [ ! -f $config_file ]; then
echo "[ERROR] config file does not exist: $config_file"
@viktorsteinwand
viktorsteinwand / Add private-var-folders to docker-machine
Last active March 28, 2016 19:43
This script add the folder /private/var/folders to the docker-machine (this is helpful for execution of phpunit in docker containers with PhpStorm)
docker-machine-nfs default --shared-folder=/Users --shared-folder=/private/var/folders
@viktorsteinwand
viktorsteinwand / Enable Linux sed on OS X
Created February 17, 2016 12:59
Enable Linux sed on OS X
# Install gnu-sed via brew
brew install gnu-sed
# using it
gsed
Please note: if installing with option "--default-names" it will replaces the default OS X sed command in the shell
@viktorsteinwand
viktorsteinwand / Windows-1252 to UTF-8 encoding
Created February 1, 2016 10:46
Convert enconding: Windows-1252 to UTF-8 encoding
iconv -f WINDOWS-1252 -t UTF-8 filename.txt
@viktorsteinwand
viktorsteinwand / Add docker-machine VM
Last active January 18, 2017 13:09
Add docker-machine VM
docker-machine create --driver virtualbox --virtualbox-disk-size "50000" -virtualbox-memory "4096" --virtualbox-cpu-count "4" default
@viktorsteinwand
viktorsteinwand / Easy access to composer docker image
Last active February 17, 2016 20:56
Easy access to composer/composer docker image
# This shell script can be used for easier accessing the composer/composer docker image (https://hub.docker.com/r/composer/composer/)
Create new composer file
```sh
sudo vim /usr/local/bin/composer
```
The contents of the file will look like this:
```sh
@viktorsteinwand
viktorsteinwand / How to delete a remote git tag
Last active October 22, 2015 08:36
How to delete a remote git tag
If you have a tag named 'v1.0.1' then you need just do following:
git tag -d v1.0.1
git push origin :refs/tags/v1.0.1

On the mac, edit /etc/exports and add a line like so:

"/Users/<username>/develop/" -network 10.211.55.0 -mask 255.255.255.0  -mapall=<username>

The network and mask parameters indicate what hosts we'll share with; in my case, this network is used by the parallels shared network adapter; yours may differ.

You may need to reload nfsd:

sudo nfsd update
@viktorsteinwand
viktorsteinwand / zsh.md
Last active August 29, 2015 14:20 — forked from tsabat/zsh.md