Skip to content

Instantly share code, notes, and snippets.

View jonasbn's full-sized avatar
🤚
keeping my distance

Jonas Brømsø jonasbn

🤚
keeping my distance
View GitHub Profile
@dynax60
dynax60 / jsonp-service.pl
Created September 3, 2010 08:01
An example of JSONP service (cross-domain) on Mojolicious..
#!/usr/bin/env perl
use strict;
use warnings;
use FindBin;
use lib "$FindBin::Bin/mojo/lib";
use Mojolicious::Lite;
FROM perl
WORKDIR /perl
ENTRYPOINT ["carton", "exec"]
RUN cpanm -n Carton
COPY tarball.tgz /perl
RUN cd /perl && tar zxf tarball.tgz && carton install --deployment
@akamola
akamola / Perl.sublime-build
Created March 15, 2013 12:06
Sublime Text 2: Build system for Perl
{
"cmd": ["perl", "-w", "$file"],
"file_regex": ".* at (.*) line ([0-9]*)",
"selector": "source.perl"
}
@henrik
henrik / macos_sierra_upgrade.md
Last active February 28, 2017 21:25
macOS Sierra update: Ruby, Rails, homebrew, VirtualBox/Vagrant, Elixir etc.

My notes from updating to macOS Sierra, as a Ruby/Rails developer working in VirtualBox/Vagrant.

Homebrew

brew doctor told me to fix /usr/local ownership:

sudo chown -R $(whoami) /usr/local

It also said Error: Failure while executing: /usr/bin/otool -L /usr/bin/install_name_tool.

@tara-gibbs
tara-gibbs / hey
Last active August 26, 2018 13:27
Handy OS X notification util to alert you with notification and speech that a long running process has completed.
#!/bin/bash
/usr/bin/osascript -e "display notification \"$*\" with title \"Hey!\""
/usr/bin/say -v Alex "Hey! $*"
# Setup: Add this to your /usr/local/bin in a file called hey. chmod +x it to make it an executable.
# Usage: sleep 2 && hey wake up!
@creaktive
creaktive / TerminusBold.dfont
Last active January 6, 2019 13:09
Terminus Powerline for Mac OS X
#!/usr/bin/env perl
# Copyright 2015 by David Golden
# Licensed under CC0 https://creativecommons.org/publicdomain/zero/1.0/
# Updated 2016-03-01:
# - more variation in organzations selected; you will want to customize this yourself
# - splits out wishlists differently/correctly
# - reports only PRs unless --all is specified
use v5.10;
use strict;
use warnings;
@inadarei
inadarei / minikube-sierra.md
Last active October 20, 2020 01:57
Minikube Setup: Docker for Mac / Sierra

Prerequisite: latest Docker for Mac on MacOS Sierra

$ brew update
$ brew install --HEAD xhyve
$ brew install docker-machine-driver-xhyve
$ sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve

$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.18.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
@Tekki
Tekki / mojo-vue.pl
Last active April 26, 2021 16:24
Mojolicious - Vue.js Example
#!/usr/bin/env perl
use Mojolicious::Lite -signatures;
get '/' => sub ($c) {
$c->render(template => 'index');
};
get '/api/:region' => sub ($c) {
my %regions = (