Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -eu
# La ou est installé stechec
prefix="/usr/"
# Default values
map="$prefix/share/stechec/prolo2011/maps/map1"
repo=$(pwd)
@plietar
plietar / dokku-client
Created October 28, 2013 13:18
Pass the -t option to ssh if stdin is a terminal
#!/usr/bin/env bash
if [[ -t 0 ]]; then
ssh -t $@
else
ssh -T $@
fi
@plietar
plietar / migrate-git-plugin.sh
Last active December 26, 2015 19:29
Dokku git plugin migration script
#!/bin/bash
set -e
DOKKU_ROOT=/home/dokku
GIT_HOME=/home/git
# Old repo files of when PPAs were used. Remove them
rm -f /etc/apt/sources.list.d/dotcloud-lxc-docker-raring.list*
# Stop and get rid of the nginx-reload daemon if it the user is upgrading from and old version (pre PR #262)
@plietar
plietar / Makefile
Created June 15, 2014 11:23
openwrt shairport Makefile
include $(TOPDIR)/rules.mk
PKG_NAME:=shairport
PKG_VERSION:=1.0
PKG_RELEASE:=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://github.com/abrasive/shairport.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=HEAD
lawrencejones at MacBookPro in .../lawrencejones/Projects/rails on (master)
λ ~> time g log --oneline -- README.md
7bbc6d6 Fix links in README for code [ci skip]
051b00c Merge pull request #17264 from claudiob/add-activejob-to-readme
b0ecbc8 Link to ActiveModel’s README in "Welcome to Rails"
8d66866 Add ActiveJob to "Welcome to Rails" section
d9b1c9b Update README.md
57fe5fd [ci skip] update wiki link for MVC
752e7a1 Use SVG version of travis build status badge [skip ci]
4f5aff9 updated Travis build status image url
@plietar
plietar / default_ai.rb
Created June 14, 2016 10:20
Default AI
angle = rand * 2 * Math::PI
@dx = Math::cos(angle)
@dy = Math::sin(angle)
def run(player, world)
angle = rand * Math::PI / 2 - Math::PI / 4
c = Math::cos(angle)
s = Math::sin(angle)
@plietar
plietar / playground.pony
Created April 3, 2018 22:35
Shared via Pony Playground
actor Main
new create(env: Env) =>
env.out.print("Hello, world!")
@plietar
plietar / playground.pony
Created April 3, 2018 22:36
Shared via Pony Playground
actor Main
new create(env: Env) =>
env.out.print("Hello, world!")
@plietar
plietar / playground.pony
Created April 3, 2018 22:37
Shared via Pony Playground
actor Main
new create(env: Env) =>
env.out.print("Hello, world!")
@plietar
plietar / main.pony
Created April 3, 2018 22:39
Shared via Pony Playground
actor Main
new create(env: Env) =>
env.out.print("Hello, world!")