Skip to content

Instantly share code, notes, and snippets.

View vonhraban's full-sized avatar
🌴
.

Vlad von Hraban vonhraban

🌴
.
  • UK & Thailand
View GitHub Profile
@vonhraban
vonhraban / appspec.yml
Created October 18, 2017 10:41
AWS CodeDeploy appspec
version: 0.0
os: linux
files:
- source: .
destination: /app/collectors
permissions:
- object: /app/collectors
owner: ec2-user
group: ec2-user
version: "2"
services:
nginx:
image: nginx:latest
container_name: tracking-nginx
ports:
- "80:80"
volumes:
- .:/app
alias fuckdock="docker rm --force $(docker ps -a -q) && docker rmi --force $(docker images -q)"
[alias]
a = add
s = status
b = branch
can = commit --amend --no-edit
pf = push --force
rewrite = "!git add . && git can && git push -f"
la = "!git config -l | grep alias | cut -c 7-"
nginx:
image: tutum/nginx
ports:
- "80:80"
links:
- phpfpm
volumes:
- ./nginx/default:/etc/nginx/sites-available/default
- ./nginx/default:/etc/nginx/sites-enabled/default
@vonhraban
vonhraban / Fuckdock
Last active February 25, 2019 17:22
alias fuckdock="docker stop -f $(docker ps -aq); docker rm -f $(docker ps -aq); docker rmi -f $(docker images -aq); docker system prune -a -f --volumes"
if [[ $(docker ps -q) ]] ; then docker kill $(docker ps -q) ; else true ; fi && if [[ $(docker ps -aq) ]] ; then docker rm $(docker ps -aq) ; else true ; fi ; sudo service docker restart
@vonhraban
vonhraban / mgoTestExample.go
Created October 10, 2019 15:11 — forked from laeshiny/mgoTestExample.go
mgo test example
package main
import (
"fmt"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
"time"
)
type Content struct {
#!/bin/sh
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# allow admins to manage homebrew's local install directory
chgrp -R admin /usr/local
chmod -R g+w /usr/local
# allow admins to homebrew's local cache of formulae and source files
chgrp -R admin /Library/Caches/Homebrew
[alias]
a = add
s = status
b = branch
can = commit --amend --no-edit
pf = push --force
rewrite = "!git add . && git can && git push -f"
la = "!git config -l | grep alias | cut -c 7-"
find = "!git ls-files | grep -i"