Skip to content

Instantly share code, notes, and snippets.

View axilleas's full-sized avatar
🏠
Working from home

Achilleas Pipinellis axilleas

🏠
Working from home
View GitHub Profile
@axilleas
axilleas / Rules
Created March 29, 2017 20:20 — forked from maxim/Rules
Convenient redirects with nanoc
#!/usr/bin/env ruby
# ...
preprocess do
RedirectGenerator.generate(config[:redirects], items)
end
route '/old_posts/*' do
item.identifier.sub('old_posts/', '') + 'index.html'
@axilleas
axilleas / semantic-pedantic.md
Created July 19, 2016 05:59 — forked from jashkenas/semantic-pedantic.md
Why Semantic Versioning Isn't

Spurred by recent events (https://news.ycombinator.com/item?id=8244700), this is a quick set of jotted-down thoughts about the state of "Semantic" Versioning, and why we should be fighting the good fight against it.

For a long time in the history of software, version numbers indicated the relative progress and change in a given piece of software. A major release (1.x.x) was major, a minor release (x.1.x) was minor, and a patch release was just a small patch. You could evaluate a given piece of software by name + version, and get a feeling for how far away version 2.0.1 was from version 2.8.0.

But Semantic Versioning (henceforth, SemVer), as specified at http://semver.org/, changes this to prioritize a mechanistic understanding of a codebase over a human one. Any "breaking" change to the software must be accompanied with a new major version number. It's alright for robots, but bad for us.

SemVer tries to compress a huge amount of information — the nature of the change, the percentage of users that wil

@axilleas
axilleas / appearances_helper.rb
Last active June 29, 2016 18:29
GitLab helper for custom login page
# Find this file in app/helpers/appearances_helper.rb
# Discussion at http://axilleas.me/en/blog/2014/custom-gitlab-login-page/
module AppearancesHelper
def brand_item
true
end
def brand_title
'My Organization'
end
@axilleas
axilleas / xvfb
Last active April 25, 2016 15:23 — forked from nyxcalamity/xvfb
/etc/init.d/xvfb service script
#! /bin/sh
### BEGIN INIT INFO
# Provides: Xvfb
# Required-Start: $local_fs $remote_fs
# Required-Stop:
# X-Start-Before:
# Default-Start: 2 3 4 5
# Default-Stop:
### END INIT INFO
@axilleas
axilleas / xvfb
Created April 25, 2016 15:11 — forked from rsanheim/xvfb
/etc/init.d/xvfb
root@ci:/etc/init.d# cat Xvfb
#! /bin/sh
### BEGIN INIT INFO
# Provides: Xvfb
# Required-Start: $local_fs $remote_fs
# Required-Stop:
# X-Start-Before:
# Default-Start: 2 3 4 5
# Default-Stop:
@axilleas
axilleas / jail.pl
Created December 7, 2013 19:26 — forked from wilbowma/jail.pl
#a/usr/bin/perl
# This script was hastily cobbled together for my own use. It can
# probably break your system. Use at your own risk.
$JAIL = "/srv/http";
$USER = "http";
$GROUP = "http";
$WWW_DIR = "www";
sub run{
@axilleas
axilleas / output
Created November 9, 2013 18:46
igitlab
Cloning into 'gitlab-shell'...
remote: Counting objects: 904, done.
remote: Compressing objects: 100% (555/555), done.
remote: Total 904 (delta 454), reused 742 (delta 314)
Receiving objects: 100% (904/904), 145.26 KiB | 151.00 KiB/s, done.
Resolving deltas: 100% (454/454), done.
Checking connectivity... done
error: unknown switch `s'
usage: git checkout [options] <branch>
or: git checkout [options] [<branch>] -- <file>...
@axilleas
axilleas / journal.log
Created September 17, 2013 16:46
journal log
-- Logs begin at Thu 2013-08-01 10:34:18 EEST, end at Tue 2013-09-17 18:35:14 EEST. --
Sep 17 18:33:45 thedude systemd-journal[95]: Runtime journal is using 344.0K (max 94.6M, leaving 141.9M of free 946.1M, current limit 94.6M).
Sep 17 18:33:45 thedude systemd-journal[95]: Runtime journal is using 348.0K (max 94.6M, leaving 141.9M of free 946.1M, current limit 94.6M).
Sep 17 18:33:45 thedude kernel: Initializing cgroup subsys cpuset
Sep 17 18:33:45 thedude kernel: Initializing cgroup subsys cpu
Sep 17 18:33:45 thedude kernel: Initializing cgroup subsys cpuacct
Sep 17 18:33:45 thedude kernel: Linux version 3.11.1-1-ARCH (tobias@testing-i686) (gcc version 4.8.1 20130725 (prerelease) (GCC) ) #1 SMP PREEMPT Sat Sep 14 20:31:35 CEST 2013
Sep 17 18:33:45 thedude kernel: Disabled fast string operations
Sep 17 18:33:45 thedude kernel: e820: BIOS-provided physical RAM map:
Sep 17 18:33:45 thedude kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
@axilleas
axilleas / cpuinfo
Last active December 22, 2015 01:49
/proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 2
model name : QEMU Virtual CPU version 1.1.2
stepping : 3
microcode : 0x1000065
cpu MHz : 2100.040
cache size : 512 KB
fpu : yes
@axilleas
axilleas / dashboard_err.log
Last active December 21, 2015 17:09
Dashboard not showing in GitLab (ActionController::RoutingError)
Started GET "/" for 127.0.0.1 at 2013-08-26 09:44:56 +0300
Processing by DashboardController#show as HTML
Rendered events/_event_last_push.html.haml (0.2ms)
Rendered dashboard/_activities.html.haml (12.7ms)
Rendered dashboard/_projects.html.haml (49.6ms)
Rendered dashboard/_groups.html.haml (10.0ms)
Rendered shared/_promo.html.haml (0.4ms)
Rendered dashboard/_sidebar.html.haml (64.2ms)
Rendered dashboard/show.html.haml within layouts/application (78.7ms)
Rendered layouts/_head.html.haml (5.4ms)