Skip to content

Instantly share code, notes, and snippets.

@oflow
oflow / display_resolution_toggle.vbs
Last active December 27, 2016 07:37
change display resolution & refresh rate toggle script
Option Explicit
Dim wsh, ret, vc, lnk
Dim width, height, dcNum
Dim dcPath, dcOpt, lnkPath, lnkDesc, icoPath, id
' dccmd.exe : http://12noon.com/?page_id=80
' dccmd.exe -listmonitors
' change monitor 1 (= \\.\DISPLAY1, = VideoController1)
dcPath = "D:\apps\dc64cmd.exe"
@oflow
oflow / suspend.sh
Created December 20, 2016 04:10
suspend -> wake up 7h later
#!/bin/sh
opt="suspend"
case $1 in
halt|poweroff|suspend|hibernate|hybrid-sleep)
opt="$1"
;;
esac
echo 0 > /sys/class/rtc/rtc0/wakealarm
# off -> wake up 7h later
@oflow
oflow / _systemctl.zsh
Last active August 30, 2018 07:17
雑なsystemctl補完
compdef _systemctl systemctl
function _systemctl() {
_arguments -C \
'1: :(--help --version
enable disable start stop restart reload \
cat status show kill \
list-units list-timers list-unit-files list-sockets \
daemon-reload \
cancel list-jobs list-machines \
@oflow
oflow / dospara_tax_include.user.js
Last active December 6, 2016 06:14
ドスパラは(+税)の表示やめろ!
// ==UserScript==
// @name ドスパラ税込み表示
// @description ドスパラは(+税)の表示やめろ!
// @include http://www.dospara.co.jp/*
// ==/UserScript==
'use strict';
['em[itemprop="price"]', '.itemSearchTable .price', 'span.rankingAreaPrice'].forEach(query => {
document.querySelectorAll(query).forEach(elm => {
var price = Number(elm.textContent.split('円')[0].replace(/[^\d]/g, ''));
// ==UserScript==
// @name Fuck you <INPUT onpaste="return false">
// @description 貼り付け禁止すんな殺すぞ!
// @include https://*
// ==/UserScript==
/* https://developer.mozilla.org/en-US/docs/Web/API/Event/stopImmediatePropagation */
document.addEventListener('paste', event => event.stopImmediatePropagation(), true);
@oflow
oflow / fuck_rakuten_header.css
Created August 31, 2016 03:59
最大値 2147483647 をそう易々と使うなボケ
@-moz-document domain(rakuten.co.jp) {
#rakutenLimitedId_header > .riShopHdrWrap {
z-index: 900 !important;
}
}
@oflow
oflow / 例のアレ.css
Created August 18, 2016 07:57
5秒経っても悩んでたら答えがわかるよ!!
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix(http://www.arealme.com/japanese-vocabulary-size-test/ja) {
.answer {
background-color: #efe !important;
transition: background-color 1s ease 5s !important;
}
li:hover .answer[value="1"] {
background-color: #fbb !important;
}
@oflow
oflow / redis.js
Created July 29, 2016 03:03
node-redisでよく使うやつだけ
var Redis = require('redis');
function redisConnect() {
var client = Redis.createClient(),
redis = {
end: function() {
client.end();
for (let prop in redis) {
delete redis[prop];
}
// ==UserScript==
// @name Redirect Linkis.com
// @description fuckin' ln.is iframe
// @include http://linkis.com/*
// ==/UserScript==
(function() {
var iframe = document.getElementById('source_site');
if (iframe) location.replace(iframe.src);
})();
@oflow
oflow / font.css
Last active June 29, 2016 12:25
偉大なるWebデザイナー様のテンプレCSSフォント指定をなかったことにする
@namespace url(http://www.w3.org/1999/xhtml);
@font-face {
font-family: "MS Pゴシック";
src: local("メイリオ");
}
@font-face {
font-family: "Osaka";
src: local("メイリオ");
}