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 arxiv: add link to ar5iv and academ.us | |
// @version 1 | |
// @grant none | |
// @include https://arxiv.org/abs/* | |
// ==/UserScript== | |
function add_link() { | |
let url_ar5iv = document.URL.replace("arxiv","ar5iv"); | |
let li_ar5iv = document.createElement('li'); |
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
tell application "CotEditor" | |
set curfont to do shell script "defaults read com.coteditor.CotEditor fontName" | |
if curfont is "Osaka-Mono" then | |
do shell script "defaults write com.coteditor.CotEditor fontName Osaka" | |
do shell script "defaults write com.coteditor.CotEditor showPageGuide -bool no" | |
else if curfont is "Osaka" then | |
do shell script "defaults write com.coteditor.CotEditor fontName Osaka-Mono" | |
do shell script "defaults write com.coteditor.CotEditor showPageGuide -bool yes" | |
end if | |
end tell |
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 "voicevox_core/voicevox_core.h" | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int main(int argc, char** argv) | |
{ | |
if (argc < 3) { | |
fprintf(stderr, "%s SPEAKER_ID TEXT\n", argv[0]); | |
return 1; |
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
* | |
!*.m | |
!Makefile |
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
// unpack embedded .rmf objects from .ol WorldCraft prefab library to current directory. | |
// list of names and descriptions would be dump into info.txt. | |
// reference: https://github.com/LogicAndTrick/sledge-formats/blob/master/Sledge.Formats.Map/Formats/WorldcraftPrefabLibrary.cs | |
#include <stdio.h> | |
#include <string.h> | |
typedef unsigned char uint8_t; | |
typedef unsigned short uint16_t; | |
typedef unsigned int uint32_t; |
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/local/bin/bbe -f | |
# NEC特殊罫線 -> SJIS 変換 | |
# reference: https://hide.maruo.co.jp/lib/hmconv/neckeisen100.html | |
s/\x86\xA2/\x84\x9F/ | |
s/\x86\xA3/\x84\xAA/ | |
s/\x86\xA4/\x84\xA0/ | |
s/\x86\xA5/\x84\xAB/ | |
s/\x86\xA6/\x84\x9F/ | |
s/\x86\xA7/\x84\xAA/ | |
s/\x86\xA8/\x84\xA0/ |
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
$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi21-clang hello.c | |
adb push a.out /data/local/tmp/hello | |
adb shell | |
chmod 755 /data/local/tmp/hello | |
/data/local/tmp/hello |
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 bash | |
# add outline to PDF using ghostscript and PDFMark | |
# reference: https://www.meadowmead.com/wp-content/uploads/2011/04/PDFMarkRecipes.pdf | |
if [ $# -lt 2 ]; then | |
echo "usage: $0 INPDF OUTPDF < OUTLINE" | |
echo ' | |
Outline example: | |
1 Title |
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
# Show in Album | |
# | |
# This script opens the album where the selected photo is in. | |
# If the photo is in multiple albums, it displays a list to choose from. | |
# | |
# It assumes: | |
# - no album with duplicate names; and | |
# - no folder/album with the same name in the same folder; and | |
# - your UI is in English, if not then you need to change the menu item name in the last part of the script. | |
# |
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 bash | |
#xsshot.sh - take X11 screenshot and output PNG to STDOUT | |
xwd | xwdtopnm | pnmtopng |
NewerOlder