Skip to content

Instantly share code, notes, and snippets.

rubyu

Block or report user

Report or block rubyu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rubyu
rubyu / Build.scala
Last active Jul 5, 2019
[WIP] eb2json
View Build.scala
import sbt.Keys._
import sbt._
import sbtassembly.AssemblyPlugin.autoImport._
object Build extends sbt.Build {
lazy val commonSettings =
Defaults.coreDefaultSettings ++
Seq(
version := "0.3.2",
scalaVersion := "2.11.8",
View sums-in-a-triangle.py
#!/bin/python3
import math
import os
import random
import re
import sys
if __name__ == '__main__':
a = int(input().strip())
@rubyu
rubyu / crevice-keyboard-fn.cs
Last active Mar 3, 2019
普通のキーボードにファンクションキーを導入するサンプル
View crevice-keyboard-fn.cs
// Example for introducing function key to normal keyboard.
// Profile for keyboard geatures.
DeclareProfile("Keyboard");
{
var fn = false;
var Whenever = When(ctx =>
{
@rubyu
rubyu / karabiner-elements.json
Last active Feb 28, 2019
F1-12, ←↑↓→, Home-End, PageUp-PageDown
View karabiner-elements.json
{
"title": "F1-12, ←↑↓→, Home-End, PageUp-PageDown",
"rules": [
{
"description": "fn + 1 -> F1",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "1",
@rubyu
rubyu / MaximizeWindow.cs
Last active Mar 2, 2019
フォアグラウンドウィンドウをマウスのあるディスプレイ上で最大化する(Ctrl+Shift+F11)
View MaximizeWindow.cs
// Script for Crevice https://creviceapp.github.io
[System.Runtime.InteropServices.DllImport("user32.dll")]
static extern short GetKeyState(int nVirtKey);
[System.Runtime.InteropServices.DllImport("user32.dll")]
static extern bool SetWindowPos(IntPtr hWnd, int hWndInsertAfter, int x, int y, int cx, int cy, int uFlags);
{
var activated = false;
View HIDIVEScreenshot.js
// ==UserScript==
// @name HIDIVE Screenshot
// @version 1.0
// @description Tested on Chrome 64 and Firefox 61 with Tampermonkey 4.7.
// @include /^https?://www\.hidive\.com/stream/.*$/
// @require http://html2canvas.hertzen.com/dist/html2canvas.js
// @grant GM_notification
// ==/UserScript==
(function() {
View Classify Crunchyroll ScreenShots.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View CrunchyrollScreenshot.js
// ==UserScript==
// @name Crunchyroll Screenshot
// @version 1.4
// @description Tested on Chrome 64 and Firefox 61 with Tampermonkey 4.7 and Crunchyroll HTML5 0.12.0.
// @include /^https?://www.crunchyroll\.com/.*$/
// @grant GM_notification
// ==/UserScript==
(function() {
'use strict';
View GestureStatusHelper.cs
// Gesture status helper.
//
// Functions:
// - Show the state of stroke gestures (current stroke status and registered stroke gestures which can be reached from it).
// - Show the synopsis of gestures which could be activated from last state of GestureMachine when it timeout.
//
// Requires:
// Crevice >= 4.15
{
string StrokeSequenceToString(IEnumerable<Crevice.Core.Stroke.StrokeDirection> strokeSequence)
View taskbar.csx
var Taskbar = When(ctx =>
{
return ctx.PointedWindow.ModuleName == "explorer.exe" &&
(ctx.PointedWindow.ClassName == "MSTaskListWClass" ||
ctx.PointedWindow.ClassName == "IMEModeButton" ||
ctx.PointedWindow.ClassName == "Button" ||
ctx.PointedWindow.ClassName == "ToolbarWindow32" ||
ctx.PointedWindow.ClassName == "InputIndicatorButton" ||
ctx.PointedWindow.ClassName == "TrayShowDesktopButtonWClass" ||
ctx.PointedWindow.ClassName == "TrayButton" ||
You can’t perform that action at this time.