Skip to content

Instantly share code, notes, and snippets.

View Nicd's full-sized avatar

Mikko Ahlroth Nicd

View GitHub Profile
@Nicd
Nicd / en.ini
Created September 11, 2020 07:20
Lithium Stats -- This was my most ambitious mIRC script, collecting statistics about your mIRC usage.
[LANG]
langname=English
langby=Nicd
langcomments=The standard english languagefile for Lithium Stats 2.1. © Nicd 2005
disabled=*** Lithium Stats logging disabled.
enabled=*** Lithium Stats logging enabled.
setresetinterval=*** Reset interval set to %lith_resetinterval seconds.
question_setresetinterval=How many seconds between resets?
@Nicd
Nicd / index.html
Last active February 9, 2019 22:03
lit-element and custom events
<!DOCTYPE html>
<html>
<head>
<script type="module" src="ts-out/main.js"></script>
<title>Tilastokeskus</title>
</head>
<body>
<main-index></main-index>
@Nicd
Nicd / index.bs.js
Created August 22, 2018 20:38
My first BuckleScript thingie
// Generated by BUCKLESCRIPT VERSION 4.0.5, PLEASE EDIT WITH CARE
'use strict';
var Old_hash_redirector = require("./old_hash_redirector.bs.js");
var change_url = function (new_url){window.location.href = new_url};
function run() {
return change_url(Old_hash_redirector.run_hash_check(window.location.hash));
}
@Nicd
Nicd / 1_README.md
Created October 16, 2017 19:50
Proposal for Code::Stats profile API request format

Request format

JSON object key is ID that will be returned with the data and value is request specification.

Request specifications

Three keys: target, group and time.

Target means what data should be returned. Can be xp for total XP amounts, language for XP split by language, or machine for XP split by machine.

@Nicd
Nicd / 42.g
Created September 8, 2017 09:18
GTLT was a 2D Brainfuck-inspired esoteric language I came up with ages ago for fun
EThe answer to life, the
universe and everything
§v >}}++++++++++!{+!v
>+++++]}++++++v>--!Q -
- - ! -
^< ^{++++++<^-------<
import {el} from 'redom';
/**
* Max diameter of pulse circle in pixels
*/
const MAX_SIZE = 20;
/**
* Min diameter of pulse circle in pixels
*/
@Nicd
Nicd / app.tpl.php
Last active March 3, 2017 23:05
PHP project base with MVT model, simple middleware system, DB basics, router, templates with shared layout
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Blah blah lorem ipsum.">
<meta name="author" content="Mikko Ahlroth">
<title>My Great Website</title>
@Nicd
Nicd / frontend.build.ex
Last active January 18, 2017 06:18
Building frontend with Mix Tasks
defmodule Mix.Tasks.Frontend.Build do
use Mix.Task
import CodeStats.TaskUtils
@shortdoc "Build the frontend"
def run(_) do
run_tasks([
"frontend.build.riot",
"frontend.build.scss"
@Nicd
Nicd / call.sh
Created December 31, 2016 15:15
Code::Stats profile API suggestion
curl -X GET 'http://localhost:5000/api/users/Nicd'
[Unit]
Description=codestats.net server
After=postgresql.service
[Service]
Type=simple
User=codestats
ExecStart=/var/codestats/codestats/run.sh
WorkingDirectory=/var/codestats/codestats