Skip to content

Instantly share code, notes, and snippets.

View AndrewDryga's full-sized avatar

Andrew Dryga AndrewDryga

View GitHub Profile
@AndrewDryga
AndrewDryga / erl-observe.sh
Last active July 11, 2023 01:20
Script for connecting Erlang Observer to remote node hosted in Kubernetes
#!/bin/bash
# This script provides easy way to debug remote Erlang nodes that is running in a kubernetes cluster.
# Usage: ./erl-observe.sh -l app=my_all -n default -c erlang_cookie
#
# Don't forget to include `:runtime_tools` in your mix.exs application dependencies.
set -e
# Trap exit so we can try to kill proxies that has stuck in background
function cleanup {
echo " - Stopping kubectl proxy."
@AndrewDryga
AndrewDryga / hrel.sh
Last active December 6, 2016 23:07
Hex.pm release bash script
#!/bin/bash
# This script simplifies releasing a new hex package.
# It will run following steps:
# 1. Run tests;
# 2. Create git tag with incremented version number (taken from mix.exs);
# 3. Start build for Hex.pm package.
#
# Usage:
# hrel [-v RELEASE_VERSION]
@AndrewDryga
AndrewDryga / reload_vb_kernel.sh
Created March 30, 2014 22:23
Shell script to rebuild VirtualBox kernel extensions under Mac OS X
#!/bin/bash
unload() {
if [ `ps -ef | grep -c VirtualBox$` -ne 0 ]
then
echo "VirtualBox still seems to be running. Please investigate!!"
exit 1;
elif [ `ps -ef | grep -c [V]ir` -gt 0 ]
then
echo "Stopping running processes before unloading Kernel Extensions"
@AndrewDryga
AndrewDryga / header.tpl
Last active February 8, 2016 08:51
YouTube Subtitles
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>{{$title}}</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="{{$description}}" />
<link rel="shortcut icon" href="/images/favicon.ico" />
<link rel="stylesheet" type="text/css" href="/css/main.css" />
{{IF $videos}}<link rel="stylesheet" type="text/css" href="/css/videos.css" />{{END}}
<meta name="google-site-verification" content="ylXpLfTMpsYwjaB0uSkVsYLbXFaywL7wsa7xqJl6tDw" />
@AndrewDryga
AndrewDryga / .zshrc
Last active August 29, 2015 13:56
SublimeText3 and Oh-My-ZSH~ Config
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="simple"
# Example aliases
@AndrewDryga
AndrewDryga / sept2013
Created September 12, 2013 19:55
Результаты лотереи книг на CocoaHeads за Сентябрь 2013 by Nebo #15 nebo15.com
There were 20 items in your list. Here they are in random order:
ID: 1532295488 - Yuriy Pleskach
ID: 100003050466207 - Pavel Vasilenko
ID: 100000989843634 - Liza Leta
ID: 100000792125129 - Sergei Merenkov
ID: 1429875608 - Edward Grankovskyi
ID: 1790702252 - Loginov Oleg
ID: 100003070062622 - Oleksandr Gayovskyy
ID: 100001049823958 - Vitaliy Zamedyanskiy
@AndrewDryga
AndrewDryga / fontselect.js
Last active December 21, 2015 09:49
Font selector
$(function() {
var fonts = [];
fonts.push({
name: 'Helvetica+Neue',
weight: [100, 300, 400, 700],
loaded: true
});
fonts.push({
name: 'Noto+Sans',
weight: [400, 700]