Skip to content

Instantly share code, notes, and snippets.

View andrioid's full-sized avatar

Andri Óskarsson andrioid

View GitHub Profile
@andrioid
andrioid / nosense.tcl
Created February 10, 2023 08:14
Old Eggdrop script I made for handling a busy Icelandic IRC channel
# nosense.tcl by Andri Oskarsson
# - merlin@scrolls.org
# - Merlin@IRCnet
#
# designed to detect lines that are not classified as an actual conversation
# - It currently detects: caps, repeat, colors, bold, reverse, disturbance and more
# To mark channels for nosense detection do like (.chanset #channel +nosense)
# Lets make it so
@andrioid
andrioid / resume.json
Last active July 3, 2019 17:53
CV in JSON Resume format
{
"basics": {
"name": "Andri Óskarsson",
"label": "Computer Engineer",
"picture": "https://andri.dk/static/3a12aa0364d1851eaab41841f8a12b88/284df/coffee-art.jpg",
"email": "m@andri.dk",
"website": "https://andri.dk",
"summary": "Driven, independent Software Developer with a broad skill set.",
"location": {
"city": "Aalborg",
@andrioid
andrioid / Dockerfile
Last active July 5, 2018 08:27
docker-compose with CompileDaemon, Postgres and go-micro
# build/base-image/Dockerfile
FROM golang:1.10-alpine
ENV GOBIN /go/bin
RUN apk add --no-cache git
RUN go get -u github.com/golang/dep/cmd/dep && go get -u github.com/githubnemo/CompileDaemon
VOLUME ["/go/src/gitlab.com/parkpark/parking"]

Keybase proof

I hereby claim:

  • I am andrioid on github.
  • I am andrioid (https://keybase.io/andrioid) on keybase.
  • I have a public key ASBGyzR9oDNGwQMN6sGbtbGgq-4XqyQG_JG6jsuckLzg9wo

To claim this, I am signing this object:

@andrioid
andrioid / .bash_profile
Created October 4, 2017 11:34 — forked from jusopi/check.sh
Set node version per project using .nvmrc file
# change title name of tab in terminal
function title {
echo -ne "\033]0;"$*"\007"
}
enter_directory(){
if [ "$PWD" != "$PREV_PWD" ]; then
PREV_PWD="$PWD";
title $(echo ${PWD##*/}) $(node -v);
if [ -e ".nvmrc" ]; then
@andrioid
andrioid / parse-template.sh
Created May 21, 2015 17:48
Replace {{tags}} with environmental variables
for line in $(find . -iname '*.dtpl'); do
config=${line%.dtpl}
cp $line $config
echo "Replacing '$config'"
for key in $(cat $config | grep -o -P '({{[0-9a-z_-]+}})'); do
ukey=$(echo $key | sed 's/.*/\U&/' | sed -e "s/{{//" | sed -e "s/}}//")
val=$(eval "echo \$${ukey}")
#echo "Tag: $key $ukey $val"
if [ -n "$val" ]; then
// HTTP Fire and Forget (Asynchronous, mostly - hey it's PHP!)
public static function SendHTTP($action, $data = null, $service = 'admin', $host = false, $port = false, $key = false){
if ($port == false) { $port = Config::Get('MBISS_PORT'); }
if ($host == false) { $host = Config::Get('MBISS_HOST'); }
if ($key == false) { $key = Config::Get('MBISS_KEY'); }
if (data == null) { $data = array(); }
if ($key == false) { $key = ''; }
if (empty($host) || empty($port)) { return false; }
@andrioid
andrioid / keybase.md
Created August 22, 2014 06:42
Keybase Proof

Keybase proof

I hereby claim:

  • I am andrioid on github.
  • I am andrioid (https://keybase.io/andrioid) on keybase.
  • I have a public key whose fingerprint is D4DE 3FBB F5CE 71A7 2EB3 A34B 7F7D 175F 7082 C827

To claim this, I am signing this object:

<?php
interface ICircuitBreakerStorage {
}
class CircuitBreaker {
/**
* StorageImplemntation should be a defined interface.
**/
@andrioid
andrioid / configparse.sh
Created June 13, 2014 08:58
Simple search/replace config file script in Bash
#!/bin/bash
# Replaces params with values and outputs
# Note: Not really designed for complex variables. So beware of sed
USAGE="configparse <infile> [param1=value1 param2=value2 .. paramn=valuen]"
# - .e.g. configparse sitebleh.tmpl DOCROOT=/data/moo USER=ano HOSTNAME=scrolls.org
if [ ! "$1" ]; then
echo $USAGE
exit 1
fi