Skip to content

Instantly share code, notes, and snippets.

View bladealslayer's full-sized avatar

Boyan Tabakov bladealslayer

View GitHub Profile
@bladealslayer
bladealslayer / bash.md
Created March 14, 2016 11:17
Bash intro

bashing things for fun and profit


Commands

  • path/to/executable
  • shell control keywords
  • shell built-ins
  • executables in the PATH
@bladealslayer
bladealslayer / Dockerrun.aws.json
Created December 22, 2015 13:40
Docker config for pulling image from ECR
{
...
"Image": {
"Name": "YOUR_AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/my-repository:latest",
"Update": "true"
},
...
}
@bladealslayer
bladealslayer / ecr.config
Last active December 22, 2015 15:24
Elastic Beanstalk configuration for accessing ECR
commands:
00_install_awscli:
command: "bash -c '[ -d awscli ] || { virtualenv awscli && source awscli/bin/activate && pip install awscli ; }'"
cwd: /var/local
01_login_ecr:
command: "bash -c 'source awscli/bin/activate && export AWS_DEFAULT_REGION=us-east-1 && eval \"$(aws ecr get-login)\"'"
cwd: /var/local
@bladealslayer
bladealslayer / ecr-policy.json
Last active January 15, 2016 08:30
IAM policy for ECR access
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "AllowEbAuth",
"Effect": "Allow",
"Action": [
"ecr:GetAuthorizationToken"
],
"Resource": [
@bladealslayer
bladealslayer / iis-rpm-graph.sh
Created May 15, 2015 07:27
Requests per minute graphs from IIS access logs with bash and gnuplot
#!/bin/bash
# Generate requests-per-minute (RPM) graphs with gnuplot from IIS access logs.
# Usage: iis-rpm-graph.sh DATE file1 [file2 ...]
# where DATE can be something like 2015-05-15 or 2015-05 or any other awk regex to match the start of line.
DATE="$1"
shift
for STATUS in all 200 500 ; do

Keybase proof

I hereby claim:

  • I am bladealslayer on github.
  • I am blade (https://keybase.io/blade) on keybase.
  • I have a public key whose fingerprint is 11C1 EC35 2D20 D566 0258 F6E5 1A8F BBB6 E617 2970

To claim this, I am signing this object:

@bladealslayer
bladealslayer / gist:6448104
Last active December 22, 2015 08:58
Fixes old merge requests from before gitlab 5.1 after migrating to 5.1 or later.
# Fixes merge requests prior to gitlabhq 5.1
# without losing the commits for closed merge requests
# (as the official migration script does).
# run this in Rails console
failed = []
MergeRequest.all.each do |mr|
begin