Skip to content

Instantly share code, notes, and snippets.

View Nicd's full-sized avatar

Mikko Ahlroth Nicd

View GitHub Profile
[Unit]
Description=codestats.net server
After=postgresql.service
[Service]
Type=simple
User=codestats
ExecStart=/var/codestats/codestats/run.sh
WorkingDirectory=/var/codestats/codestats
@Nicd
Nicd / gist:6158820
Created August 5, 2013 19:35
Around 800 MB to compile with 'mix compile' in an otherwise empty project, on OS X 10.6.8 with elixir 0.10.1-dev.
defmodule ExCoder do
def encode(str) do
end
def decode("	"), do: " "
def decode("
"), do: """
@Nicd
Nicd / gist:7238099
Last active December 27, 2015 00:29
SailfishOS upgrade error
The upgrade goes fine and "show details" shows the following (I truncated some rows):
Downloading packages...
Downloading archive hash for ...
Downloading archive for component ...
Installing component SailfishOS emulator
/Users/nicd/SailfishOS/emulator/sailfishos.vdi
/Users/nicd/SailfishOS/emulator
@Nicd
Nicd / #payday.log
Last active November 26, 2015 21:27
IRC logs from #payday @ QuakeNet regarding the group order
----
2014-11-24T15:32:58+0200 @Nicd but looks like we're going to have to wait since some of that stuff is only available january 2015
2015-05-04T15:06:18+0300 @Nicd ha, now the dozer bobblehead's ETA has been moved back to 15th of May
2015-05-04T15:06:23+0300 @Nicd but the suit shirts have been moved to June
2015-07-02T14:17:23+0300 @usvi Nicd: when did we order actually? I have lost trace
2015-07-02T14:18:44+0300 @Nicd november
@Nicd
Nicd / moment.js
Created November 24, 2014 11:40
New, smaller patch to use moment.js in Qt 5.2
.pragma library
//! moment.js
//! version : 2.8.4
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var moment = (function (undefined) {
/************************************
<?php include "../includes/session_start.php"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Admin Overall</title>
<link rel="stylesheet" href="style/content.css" type="text/css" media="screen" />
<link rel= "stylesheet" type="text/css" href= "Styles/userscss.css" />
<link rel= "stylesheet" type="text/css" href= "Styles/sidebars.css" />
@Nicd
Nicd / blog.nytsoi.net
Created October 29, 2015 17:20
nginx configuration for HTTPS
server {
listen 80;
listen [::]:80;
server_name blog.nytsoi.net;
location / {
rewrite ^ https://$server_name$request_uri permanent;
}
}
@Nicd
Nicd / .tmux.conf
Last active September 6, 2015 11:49
My .tmux.conf
# UTF-8 on for all windows
set-option -g utf8 on
set-option -g history-limit 10000
set-option -g prefix C-a
# Resize keys
bind u resize-pane -U
bind j resize-pane -D
bind h resize-pane -L
bind k resize-pane -R
@Nicd
Nicd / gulpfile.js
Last active August 29, 2015 14:21
// Node modules
var fs = require('fs'), vm = require('vm'), chalk = require('chalk');
// Gulp and plugins
var gulp = require('gulp'), concat = require('gulp-concat'),
replace = require('gulp-replace'), uglify = require('gulp-uglify');
// Gulp minify for smallinizing our CSS
var minify = require('gulp-minify-css');
get_number = fn (text) ->
case Regex.run(~r/\w (\d+)/, text) do
[_, number]
-> number
_
-> nil
end
end
"10" = _number = get_number.("a 10")