Skip to content

Instantly share code, notes, and snippets.

View nikeee's full-sized avatar

Niklas Mollenhauer nikeee

View GitHub Profile
<?php declare(strict_types = 1);
use Phan\Issue;
use Phan\PluginV3;
use Phan\CodeBase;
use Phan\IssueInstance;
use Phan\PluginV3\FinalizeProcessCapability;
use Phan\PluginV3\SubscribeEmitIssueCapability;
final class GitHubWorkflowCommandsPlugin extends PluginV3 implements FinalizeProcessCapability, SubscribeEmitIssueCapability {
@nikeee
nikeee / preprocess.mjs
Last active October 10, 2023 18:12
replaces `#include filename` with the contents of the file
#!/usr/bin/env node
// @ts-check
import { createReadStream } from "node:fs";
import { realpath } from "node:fs/promises";
import * as rl from "node:readline/promises";
import * as path from "node:path";
const fileToProcess = process.argv[2];
if (!fileToProcess) {
@nikeee
nikeee / main.cpp
Created June 3, 2020 23:48
IL0373F ESP8266 NodeMCU
#include "main.hpp"
/*
VCC -> 3V3
GND -> GND
D/C -> D3
SDI -> DD7
CS -> D8 (SS)
CLK -> D5
BUSY -> D2
@nikeee
nikeee / gist:295c91940ad86974b6bc884c2e795628
Created July 18, 2019 16:33 — forked from bessarabov/gist:674ea13c77fc8128f24b5e3f53b7f094
One-liner to generate data shown in post 'At what time of day does famous programmers work?' — https://ivan.bessarabov.com/blog/famous-programmers-work-time
git log --author="Linus Torvalds" --date=iso | perl -nalE 'if (/^Date:\s+[\d-]{10}\s(\d{2})/) { say $1+0 }' | sort | uniq -c|perl -MList::Util=max -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; foreach (0..23) { $h{$_} = 0 if not exists $h{$_} } foreach (sort {$a <=> $b } keys %h) { say sprintf "%02d - %4d %s", $_, $h{$_}, "*"x ($h{$_} / $m * 50); }'
/*
rand_custom.c is a rewritten version of the glibc/stdlib/random_r.c in order to get the system state of seeding threadprivate
Copyright (C) 2017 Mollenhauer, Ruhl
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
.monaco-editor .monaco-editor-hover {
background-color: #fdfec9;
color: black;
}
.action-container {
border: 1px solid gray;
border-radius: 5px;
color: black !important;
padding: 2px 5px;
@nikeee
nikeee / GIT-FSCK.adoc
Created October 11, 2017 10:21 — forked from mbbx6spp/GIT-FSCK.adoc
How to check your git object sanity

fsck-ing your Git objects by default

Yo developers (git interactive users), check if you are fsck-ing your objects on transfer:

git config --null --get transfer.fsckobjects
git config --null --get fetch.fsckobjects

If that is null or false, then …​ set it to true:

git config --global transfer.fsckobjects true
// ==UserScript==
// @name Telegram-Background
// @namespace telegram
// @description Tiles Background for Telegram
// @include https://web.telegram.org/*
// @version 1.0.1
// @downloadURL https://gist.github.com/raw/65757a72f8eb039c6a5de963ff8b1c2e/telegram_background.user.js
// @grant none
// ==/UserScript==
@nikeee
nikeee / Form1.cs
Last active August 29, 2015 14:14 — forked from Stasonix/Form1.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Text.RegularExpressions;
using System.IO;
@nikeee
nikeee / smiley-code.sco
Created June 30, 2014 17:45
draft idea for a programming language
:/ Comment
:\
Comment block
:*/
:/ assigning variables
"abc" :> VAR
:/ throwing exceptions