Skip to content

Instantly share code, notes, and snippets.

Add-Type -AssemblyName System.Windows.Forms;
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class WindowHandler {
[DllImport("user32.dll")]
public static extern IntPtr GetForegroundWindow();
}
"@

Keybase proof

I hereby claim:

  • I am mysticdoll on github.
  • I am mysticdoll (https://keybase.io/mysticdoll) on keybase.
  • I have a public key ASBOygLof_wC5xpsQU60q0-kwNIOqgDBeo1vSFZZEX20sQo

To claim this, I am signing this object:

pub enum ValType {
I32(Option<i32>),
I64(Option<i64>),
F32(Option<f32>),
F64(Option<f64>),
}
pub struct FuncType {
params: Vec<ValType>,
results: Vec<ValType>
int a = 1;
int b = 2;
int c = 3;
void inc_a() {
a = a + 1;
}

Keybase proof

I hereby claim:

  • I am MysticDoll on github.
  • I am mysticdoll (https://keybase.io/mysticdoll) on keybase.
  • I have a public key whose fingerprint is 7D69 EF8C B2EF AD91 3F49 7591 F1FB 3296 0137 ED43

To claim this, I am signing this object:

[4028115.842]
X.Org X Server 1.18.3
Release Date: 2016-04-04
[4028116.078] X Protocol Version 11, Revision 0
[4028116.174] Build Operating System: Linux 4.1.12-101.fc21.x86_64 x86_64
[4028116.375] Current Operating System: Linux localhost 4.12.0-rc6-g48ec1f0-dirty #21 Fri Aug 4 21:02:28 CEST 2017 i586
[4028116.375] Kernel command line: loglevel=3 console=tty0 root=root rootfstype=9p rootflags=trans=virtio ro TZ=UTC-09:00
[4028116.721] Build Date: 24 June 2017 08:16:45PM
[4028116.831]
[4028116.938] Current version of pixman: 0.34.0
@MysticDoll
MysticDoll / sekimiya.js
Created September 21, 2017 08:45
ツイートの会話スレッドに現れてるユーザーの列挙
import ThreadedUsers = require("./threadedUsers");
let threaded = new ThreadedUsers("https://twitter.com/sekimiya/status/666901649798000640");
threaded.fetch().then(users => console.log(users));
@MysticDoll
MysticDoll / handspinner.js
Created June 14, 2017 10:04
ウェブページをハンドスピナーにするスクリプト
(function() {
"use strict";
const Point = class Point {
constructor(x, y) {
this.x = x;
this.y = y;
}
static fromMouseEvent(e) {
@MysticDoll
MysticDoll / xawawa_oneliner.js
Last active December 6, 2016 10:32
ぁわわワンライナー JavaScript
var m = Math, str = "", seed = "ぁわ", task = s => /ぁわわ/.test(s) ? s : task(s + seed[m.floor(m.random() * 1000) % seed.length]), out = console.log(`${task(str)}、そんな話になってたとは。すみませんm(_\`_)m`);
@MysticDoll
MysticDoll / xawawa.js
Last active December 6, 2016 08:34
「ぁ」と「わ」と「わ」をランダムに連結していって、「ぁわわ」が現れたらそれまでに連結した文字列を出力して終了するJavaScript
var str = "";
const seed = "ぁわ".split("");
while(true) {
str += seed[Math.floor(Math.random() * 10000) % seed.length];
if(/ぁわわ/.test(str))
break;
}
console.log(`${str}、そんな話になってたとは。すみませんm(_\`_)m`);