Skip to content

Instantly share code, notes, and snippets.

View jandudulski's full-sized avatar

Jan Dudulski jandudulski

View GitHub Profile
@jandudulski
jandudulski / gruvbox-light.conf
Created January 27, 2020 20:25
gruvbox-light theme for kitty - the fast, featureful, GPU based terminal emulator
# gruvbox-light colorscheme for kitty
foreground #3C3836
background #FBF1C7
selection_foreground #FBF1C7
selection_background #3C3836
color0 #FBF1C7
color8 #928374
@jandudulski
jandudulski / application.rb
Created March 15, 2019 14:02
Rails configuration injection for specs
# config/application.rb
module MyApp
class Application < Rails::Application
config.my_setting = "prod value"
end
end
@jandudulski
jandudulski / keybase.md
Created May 7, 2018 15:48
Keybase proof

Keybase proof

I hereby claim:

  • I am jandudulski on github.
  • I am jandudulski (https://keybase.io/jandudulski) on keybase.
  • I have a public key ASCMUj1umlk4cmxYS3AMLvC1WCW1UurVNvZwhngx7IswVAo

To claim this, I am signing this object:

@jandudulski
jandudulski / docker-cleanup-resources.md
Last active April 19, 2018 09:40 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@jandudulski
jandudulski / interpolation.tf
Created February 22, 2018 10:08
Chicken or the Egg. Terraform’s Remote Backend
# this won't work
terraform {
backend "s3" {
bucket = "${var.bucket}"
dynamodb_table = "${var.dynamodb_table}"
# reminder of the config...
}
}
@jandudulski
jandudulski / eventstore.conf
Created December 7, 2016 14:26
nginx event store reverse proxy
server {
listen 80;
server_name es.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
#!/bin/bash -e
if [ ! -f .phantomjs/2.1.1/x86_64-linux/bin/phantomjs ]; then
curl -k -L -o phantomjs.tar.bz2 http://ci.monterail.io/files/phantomjs-2.1.1-linux-x86_64.tar.bz2
tar -jxf phantomjs.tar.bz2
mkdir -p .phantomjs/2.1.1/x86_64-linux/bin
mv phantomjs-2.1.1-linux-x86_64/bin .phantomjs/2.1.1/x86_64-linux/
else
echo "Phantomjs 2.1.1 is already installed"
fi
@jandudulski
jandudulski / restart.md
Last active January 12, 2016 15:59
Passenger multiple instances

So you want to restart your passenger standalone app

cd path/to/app && ./bin/passenger-config restart-app .

This works until you have multiple passenger apps...

./bin/passenger-config restart-app .
@jandudulski
jandudulski / nginx.conf
Created December 4, 2014 11:02
Faye nginx configuration
location /faye {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
@jandudulski
jandudulski / compile.coffee
Last active August 29, 2015 14:08
Data from directive with custom template
angular.module("app").directive 'box', ($compile) ->
restrict: 'AE'
scope: {}
compile: (elem, attrs) ->
template = elem.html()
(scope, elem, attrs, controller) ->
elem.empty()
elem.append($compile(template)(scope))