Skip to content

Instantly share code, notes, and snippets.

View jtiala's full-sized avatar

Joonas Tiala jtiala

View GitHub Profile
@jtiala
jtiala / machine.js
Created October 28, 2020 15:32
Generated by XState Viz: https://xstate.js.org/viz
const bookingMachine = Machine({
id: "booking",
initial: "idle",
context: {
fetched: {
purposes: undefined,
specifiers: undefined,
servicePoints: undefined,
appointmentTypes: undefined,
},
@jtiala
jtiala / lista-hamahakkimiehen-vihollisista.md
Created May 8, 2020 09:23
Lista Hämähäkkimiehen vihollisista

Lista Hämähäkkimiehen vihollisista

  • Tohtori Mustekala
  • Hiekkamies
  • Moukantappaja
  • Tärisyttäjä
  • Robottimestari
  • Valomestari
  • Virvatuli
  • Venom
@jtiala
jtiala / reverse-proxy.conf
Last active December 11, 2018 14:42
Simple nginx reverse proxy for using CORS enabled frontend with non-CORS backend in local development environment
# Simple nginx reverse proxy for using CORS enabled frontend with non-CORS backend in local development environment
#
# Usage:
# docker run --name reverse-proxy -v /path/to/this/file/reverse-proxy.conf:/etc/nginx/conf.d/default.conf:ro -p 8080:80 -d nginx
server {
listen 80;
server_name localhost;
client_max_body_size 1024M;
@jtiala
jtiala / alfred_iterm_new_window.applescript
Last active March 24, 2021 15:58
Open new iTerm window for each Alfred terminal command
-- open new iTerm window for each Alfred terminal command
-- for iTerm 3.1.1+
-- based on script by Sinan (https://github.com/stuartcryan/custom-iterm-applescripts-for-alfred)
on alfred_script(q)
if application "iTerm2" is running or application "iTerm" is running then
run script "
on run {q}
tell application \"iTerm\"
activate
@jtiala
jtiala / autoexec.cfg
Last active June 5, 2020 17:30
My CS:GO configs
// rates
cl_cmdrate "128"
cl_updaterate "128"
cl_interp_ratio "1"
cl_interp "0"
rate "128000"
fps_max "0"
// crosshair
cl_crosshair_drawoutline "1"
use strict;
use vars qw($VERSION %IRSSI);
use Irssi qw(command_bind signal_add);
use IO::File;
$VERSION = '0.69';
%IRSSI = (
authors => 'Joonas Tiala',
contact => 'joonas.tiala@gmail.com',
@jtiala
jtiala / tmuxgo
Created November 29, 2016 10:45
tmuxgo
#!/bin/bash
SESSION=`basename $PWD`
tmux -2 new-session -d -s $SESSION
tmux rename-window -t $SESSION:1 vim
tmux split-window -h
tmux split-window -v
tmux select-pane -t 0
tmux resize-pane -R 30
@jtiala
jtiala / finnishCountryNames.php
Last active December 3, 2015 12:38
A PHP array of Finnish names of countries by ISO-3166-1 code
<?php
$countries = array(
"AC" => "Ascension Island",
"AD" => "Andorra",
"AE" => "Arabiemiirikunnat",
"AF" => "Afganistan",
"AG" => "Antigua ja Barbuda",
"AI" => "Anguilla",
"AL" => "Albania",