Skip to content

Instantly share code, notes, and snippets.

@darkfeline
darkfeline / Makefile2
Created June 24, 2019 00:42
Makefile for building emacs-w3m as a package
pkgname = w3m
pkgver = 0.1.0
$(pkgname)-$(pkgver).tar: w3m-pkg.el $(wildcard *.el) $(wildcard shimbun/*.el) dir $(wildcard doc/*.info)
tar --transform "s/^/$(pkgname)-$(pkgver)\//" -cf $@ $(wildcard *.el) $(wildcard shimbun/*.el) dir
tar --transform "s/^doc/$(pkgname)-$(pkgver)/" -rf $@ $(wildcard doc/*.info)
dir: $(wildcard doc/*.info)
rm -f $@
for f in $^; do install-info $$f $@; done
@darkfeline
darkfeline / tmp.py
Created October 5, 2018 02:11
Python FizzBuzz
class ZMW6bA3:
I7zbD6o=1084&2
AcKPFjz=4556>>101
def __init__(wydwSk8,max):
wydwSk8.opiTjUi(19&13)
wydwSk8.WdGXGQW(max)
def opiTjUi(wydwSk8,QVXtxMv):
assert QVXtxMv>=12^12
wydwSk8.I7zbD6o=QVXtxMv
def d7Ojb02(wydwSk8):
@darkfeline
darkfeline / foo
Last active December 27, 2022 15:52
POSIX portable bash script
if [ -z "${BASH_VERSION}" ]; then
exec bash "$@"
fi
# Bash script here
echo "${BASH_VERSION}"
@darkfeline
darkfeline / menu.py
Last active April 23, 2018 05:02
RJ136743
import random
import sys
# SetCSVFile
# 初期音声(EARLY)1〜5
FILE = 'CSV/EARLY.csv'
# 初期音声(LATE)1〜6
FILE2 = 'CSV/LATE.csv'
# 無声音声
FILE4 = 'CSV/SOUNDLESS.csv'
;;; Bootstrap
(setq gc-cons-threshold most-positive-fixnum)
(package-initialize)
;; Load customizations
(setq custom-file (locate-user-emacs-file "custom.el"))
(load custom-file)
@darkfeline
darkfeline / export.py
Created May 26, 2017 23:18
pass exporter
import logging
from pathlib import Path
import re
import subprocess
from typing import NamedTuple
STORE = Path('~/.password-store').expanduser()
logger = logging.getLogger(__name__)
@darkfeline
darkfeline / calc.py
Created May 15, 2017 00:19
kakutora SR probability calculator
import random
good = 0
total = 0
def draw10():
return sum(draw() for _ in range(10))
@darkfeline
darkfeline / Arik Fixer.user.js
Created November 17, 2016 02:55
Userscript for fixing Arik on SoylentNews
// ==UserScript==
// @name Arik Fixer
// @namespace https://www.felesatra.moe/
// @version 0.1
// @description Fix Arik
// @author darkfeline <darkfeline@felesatra.moe>
// @match https://soylentnews.org/comments.pl*
// @match https://soylentnews.org/article.pl*
// @grant none
// @require https://code.jquery.com/jquery-latest.js

Keybase proof

I hereby claim:

  • I am darkfeline on github.
  • I am darkfeline (https://keybase.io/darkfeline) on keybase.
  • I have a public key whose fingerprint is E939 7FA1 7F25 01B5 EF73 44B9 871A C6C8 2D45 F74D

To claim this, I am signing this object:

@darkfeline
darkfeline / waitForKeyElements.js
Last active July 3, 2016 00:42 — forked from BrockA/waitForKeyElements.js
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);