R.I.P.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name HSPTV! Forum Script | |
// @version 1.1.2 | |
// @description HSPTV!掲示板用のUserScriptです。 | |
// @author prince | |
// @homepage http://prince0203.github.io/ | |
// @copyright (c)prince 2016 | |
// @namespace io.github.prince0203 | |
// @icon http://hsp.tv/favicon.ico | |
// @match http://hsp.tv/play/pforum.php?mode=* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Node.js API Doc Redirect | |
// @version 1.0.1 | |
// @match https://nodejs.org/api/* | |
// @run-at document-start | |
// ==/UserScript== | |
(() => { | |
'use strict'; | |
location.pathname = '/dist/latest-v6.x/docs' + location.pathname; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const stripMargin = (string, marginPrefix = '|') => { | |
const lines = string.replace(/^\n|\n+$/g, '').split('\n'); | |
let result = ''; | |
lines.forEach((val, i) => { | |
const indexOfMarginPrefix = val.indexOf(marginPrefix); | |
if(indexOfMarginPrefix !== -1) { | |
result += val.slice(indexOfMarginPrefix + 1) + '\n'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <bitset> | |
#include <unordered_set> | |
#include <climits> | |
constexpr auto uint64_bits = CHAR_BIT * sizeof(uint64_t); | |
using show_bits = std::bitset<uint64_bits>; | |
uint64_t to_bitmask(const std::unordered_set<uint8_t>& from) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import os | |
import random | |
import string | |
from PIL import Image, ImageOps | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Turn off PWR LED (Red) | |
dtparam=pwr_led_trigger=none,pwr_led_activelow=on | |
# Turn on ACT LED (Green) | |
dtparam=act_led_trigger=default-on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/system/reboot.service | |
[Unit] | |
Description = Reboot | |
RefuseManualStart = true | |
RefuseManualStop = true | |
[Service] | |
ExecStart = /sbin/reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const extractTweetTimeFromId = id => Math.floor(parseInt(id, 10) / 4194304) + 1288834974657 |