Skip to content

Instantly share code, notes, and snippets.

View stylebot.css
{"*":{"_enabled":true,"_rules":{"body":{"font-family":"\"Noto Sans CJK SC\""}}},"tweetdeck.twitter.com":{"_enabled":true,"_rules":{"html.dark .is-wide-columns .media-size-medium":{"height":"353px"}}}}
@yaqinking
yaqinking / TricolourLovestorySteamSpy.py
Created Sep 22, 2017
Windows 10 local push notification python script to see Tricolour Lovestory owners number.
View TricolourLovestorySteamSpy.py
'''
Windows 10 local push notification python script to see Tricolour Lovestory owners number.
by yaqinking
See image: https://i.imgur.com/fC69kJs.png
'''
import requests
from win10toast import ToastNotifier #https://github.com/jithurjacob/Windows-10-Toast-Notifications
@yaqinking
yaqinking / MainWindow.tjs
Last active Feb 13, 2017
MainWindow modified version #kag
View MainWindow.tjs
with (selectLayer) {
var msgoff = false, msgon = false;
if (elm.msgoff) msgoff = true;
else if (elm.msgon ) msgon = true;
else {
msgoff = typeof .msgoff != "undefined" && !!.msgoff;
msgon = typeof .msgon != "undefined" && !!.msgon;
}
if (msgoff) {
kag.fore.messages[float_sys_control_layer_index].setVisibleTime(false, 300);
@yaqinking
yaqinking / add-float-system-control-to-kagex.tjs
Last active Jan 18, 2017
添加浮动的系统控制到 KAGEX 中
View add-float-system-control-to-kagex.tjs
// put under code to AfterInit.tjs
// 浮动系统控制的 message layer index,在 macro 里初始化的带 button 的 message layer 和这个数字要相同
var float_sys_control_layer_index = 5;
/**
* 鼠标移动的 callback
* 添加鼠标移动到指定位置显示 layer
*/
function mouseMoveFunc(x, y, shift) {
//dm("mouseMoveFunc x-> ", x, " y->", y, " shift-> ", shift);
View autohotkey-convert-code-in-notepad-plus-plus.ahk
; yaqinking
; ctrl alt 3 是窝在 Notepad++ 里设置的转换编码到 UCS2LE 的快捷键
; 按 ctrl alt v 之后执行 输入数量 次转换编码的操作
^!v::
InputBox, FileCount, 文件数量, 请输入要转换的文件数量, , 320, 120
Loop, %FileCount%
{
Send ^!3
sleep 50
View tjs.sublime-completions
{
"scope":"source.tjs",
"author": "yaqinking",
"completions":
[
{ "-------": "-------------DECLARE START----------- " },
{ "trigger": "func \t Declare function", "contents": "function $1($2) {\n $3\n}" },
{ "trigger": "func \t Declare function call super.$1(...)", "contents": "function $1($2) {\n $3\n super.$1(...);\n}" },
{ "trigger": "classExtendsWindow \t Declare Window subclass", "contents": "class $1 extends Window {\n function $1() {\n super.Window();\n $3\n }\n\n function finalize() {\n super.finalize();\n }\n}" },
{ "trigger": "classExtendsLayer \t Declare Layer subclass", "contents": "class $1 extends Layer {\n function $1(window, parent) {\n super.Layer(window, parent);\n $3\n }\n\n function finalize() {\n super.finalize();\n }\n}" },
@yaqinking
yaqinking / convert-utf8-utf16le.bat
Created Nov 24, 2016
使用 iconv 来转换 UTF-8 编码到 UTF-16LE 编码
View convert-utf8-utf16le.bat
:: 一句一句执行
mkdir new
for /f %x in ('dir /b *.tjs') do iconv -f UTF-8 -t UTF-16LE %x > new\%x
@yaqinking
yaqinking / startup.tjs
Last active Nov 21, 2016 — forked from jin1016/startup.tjs
吉里吉里Z 播放 H.264/AVC 编码的 mp4 文件
View startup.tjs
/**
* 主要用来发布时减小视频的文件大小。(同时这样子就算是放 1080p/4k 的视频时,资源大小也说的过去,既然 krkrz 使用 d3d9 支持分辨率到 8k,那应该不是大问题的 poi,大概。)
*/
class H264Window extends Window {
var base;
var video;
function H264Window( width, height ) {
super.Window();
setSize( width, height );
setInnerSize( width, height );
@yaqinking
yaqinking / kag_calculate_macro_parameter_value.ks
Created Nov 21, 2016
KAG/TJS script example 计算传入 macro 的变量值时
View kag_calculate_macro_parameter_value.ks
[iscript]
/**
* 计算传入 macro 的变量值时
*/
var result = 0;
var xpos = 0;
var xmov = 0;
[endscript]
@macro name=calc_move
@yaqinking
yaqinking / kag.sublime-completions
Created Nov 20, 2016
KAG auto completion for Sublime Text 3
View kag.sublime-completions
{
"scope": "source.ks",
"completions":
[
{ "trigger": "sf \t 系统变量", "contents": "sf." },
{ "trigger": "f \t 游戏变量", "contents": "f." },
{ "trigger": "tf \t 临时变量", "contents": "tf." },
{ "trigger": "tf \t 临时变量", "contents": "tf." },
{ "trigger": "lr \t 点击换行", "contents": "[lr]" },