Skip to content

Instantly share code, notes, and snippets.

@8q
8q / .fdignore
Last active September 23, 2022 16:51
fzf ~/.fdignore
/Applications/
/Library/
/.Trash/
/.gradle/
/.cache/
/.nodebrew/
/.npm/
/.pyenv/
/go/
<!DOCTYPE html>
<!-- Let's view the HTML source code of this page!! -->
<!-- Or save this text as HTML source code :) -->
<html>
<head>
<meta charset="utf-8"/>
<title>Quine</title>
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro&display=swap" rel="stylesheet">
</head>
<body>
on open location url_scheme
(*デリミタで文字列抽出*)
set AppleScript's text item delimiters to {"vlc://"}
set txt_items to text items of url_scheme
set AppleScript's text item delimiters to {""}
set scheme_txt to txt_items as Unicode text
do shell script ({"/Applications/VLC.app/Contents/MacOS/VLC ", scheme_txt} as string)
end open location
@8q
8q / open-vlc.bat
Created February 8, 2020 17:10
VLCスキーム(Win)
set vlcdata=%1
start "" "C:\Program Files\VideoLAN\VLC\vlc.exe" "%vlcdata:~7%"
@8q
8q / tweetdeck.js
Last active December 8, 2019 20:35
(() => {
const texts = [
"俺の勝ち。",
"俺の勝ちだが?",
"お前の負け。",
"お前の負けだが?",
"I win.",
"You lose."
]
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import NoSuchElementException
import chromedriver_binary
import os
import time
@8q
8q / decompose.js
Last active October 31, 2019 08:04
置換->互換の積
// function decompose(l, i) {
// if (i < l.length) {
// var j = l[i]
// if (i === j) {
// return decompose(l, i + 1)
// } else {
// [l[i], l[j]] = [l[j], l[i]]
// return [[i, j]].concat(decompose(l, i + 1))
// }
// } else {
@8q
8q / batch.sh
Created July 21, 2019 03:39
m2ts -> mp4バッチ
#!/bin/bash
if [ $# -lt 1 ]; then
echo 'Usage: $ ./batch.sh input_dir'
exit 1
fi
find $1 -type f |
grep -E "\.m2ts$" |
sed 's/\.m2ts$//g' |
@8q
8q / danime.js
Created October 11, 2019 16:35
dアニメストア10倍速
var speed=10,e=document.querySelector('#speed>.w1');e.setAttribute('data-value', speed);e.click()
@8q
8q / おっ.py
Created November 8, 2014 04:25
おっぱいそんちくびんびん♪
#coding: UTF-8
'''
Created on 2014/11/08
@author: shirasu
'''
import random