Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name enforce japanese
// @include *
// ==/UserScript==
(function () {
var html = document.getElementsByTagName("html")[0];
if (!html) return;
if (!html.lang) {
var c = document.characterSet;
#include <type_traits>
namespace detail {
template <typename T>
struct identity { typedef T type; };
template <typename T>
struct has_overloaded_address_operator_impl {
template <typename U>
static std::true_type check(U *p, identity<decltype(p->operator &())> * = 0);
template <typename U>
@kikairoya
kikairoya / _etc_profile.d_systemd.sh
Created June 24, 2013 14:01
Enables 'systemctl --user' without X11, dbus-launch, systemd-user-session
if [ ! -S /run/user/$(id -u)/dbus/user_bus_socket ]; then
mkdir -p /run/user/$(id -u)/dbus
dbus-daemon --session --fork --address=unix:path=/run/user/$(id -u)/dbus/user_bus_socket --systemd-activation
fi
if ! systemctl --user > /dev/null 2> /dev/null; then
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/dbus/user_bus_socket /usr/lib/systemd/systemd --user & > /dev/null 2> /dev/null
fi
@kikairoya
kikairoya / hatebu.js
Created July 14, 2013 06:52
skip hatebu comment page
// ==UserScript==
// @name hatebu
// @include http://b.hatena.ne.jp/entry/*
// ==/UserScript==
(function () {
document.addEventListener('DOMContentLoaded', function () {
var n = document.getElementById("head-entry-link");
if (n) location.href = n.attributes["href"].nodeValue;
}, false);
@kikairoya
kikairoya / tumblr.js
Created July 16, 2013 14:33
tumblr から引用元に直接飛ぶ
// ==UserScript==
// @name tumblr
// @include http://*.tumblr.com/post/*
// ==/UserScript==
(function () {
document.addEventListener('DOMContentLoaded', function () {
var n = document.getElementsByClassName("source_link")[0];
if (n) location.href = n.attributes["href"].nodeValue;
}, false);
{
"network":{
"listen-port":2012,
},
"jail":{
"jail":"ptracer.exe",
"basedir":"/tmp/wandbox",
"max-address-space":1073741824,
"max-cpu-time":600,
"max-data-segment":134217728,
@kikairoya
kikairoya / geocities.jp
Created August 5, 2013 08:06
kill geocities' ad window
// ==UserScript==
// @name geocities
// @include http://www.geocities.jp/*
// ==/UserScript==
(function () {
document.addEventListener('DOMContentLoaded', function () {
var n = document.getElementById("y_gc_div_adcntr");
if (n) n.parentNode.removeChild(n);
}, false);
diff --git a/modules/linux/dkms.conf b/modules/linux/dkms.conf
index 3ed77f9..263921f 100644
--- a/modules/linux/dkms.conf
+++ b/modules/linux/dkms.conf
@@ -1,39 +1,35 @@
PACKAGE_NAME=open-vm-tools
PACKAGE_VERSION=2013.04.16
MAKE_CMD_TMPL="make VM_UNAME=\$kernelver \
- MODULEBUILDDIR=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build"
+ MODULEBUILDDIR=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build \
@kikairoya
kikairoya / wandbox.l
Last active April 5, 2020 08:04
post to wandbox from xyzzy
(eval-when (:compile-toplevel :load-toplevel :execute)
(require 'xml-http-request)
(require 'json))
(defpackage :wandbox
(:use :lisp :editor))
(in-package "wandbox")
(export '(post-wandbox-region post-wandbox post-wandbox-string show-compiler-list show-compiler-options))
; 雀の往来
(require "isearch")
(require "ni/setup")
(require "wandbox")
(ni-autoload)
(setq-default backup-by-copying t)
(setf
(symbol-function 'backward-delete-char-untabify-or-selection) #'delete-backward-char-or-selection