Skip to content

Instantly share code, notes, and snippets.

@oov
oov / Visual Studio Code settings.json
Created July 29, 2021 18:38
Windows Terminal と Visual Studio Code に MSYS2 用の項目を追加する
"MSYS2": {
"path": [
"C:\\msys64\\usr\\bin\\bash.exe"
],
"args": [
"--login"
],
"env": {
"MSYSTEM": "MSYS2",
"CHERE_INVOKING": "1"
@oov
oov / utf8.lua
Last active October 14, 2018 00:46
UTF-8文字列を1文字ずつで分解するLuaスクリプト
-- The MIT License (MIT)
--
-- Copyright (c) 2018 oov
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy of
-- this software and associated documentation files (the "Software"), to deal in
-- the Software without restriction, including without limitation the rights to
-- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-- the Software, and to permit persons to whom the Software is furnished to do so,
-- subject to the following conditions:
<?php
class 🍔 {
public function 👄() {
echo "👌👌👌";
}
}
$🍔 = new 🍔();
$🍔->👄();
@oov
oov / XorShiftRNG.js
Created May 11, 2012 10:18
XorShiftRNG
XorShiftRNG = (function(){
//from: http://d.hatena.ne.jp/uupaa/20091223/1261528727
var nowimpl = !!Date.now;
//from: http://homepage2.nifty.com/magicant/sjavascript/mt.html
function mul(a, b) {
var a1 = a >>> 16, a2 = a & 0xffff;
var b1 = b >>> 16, b2 = b & 0xffff;
return (((a1 * b2 + a2 * b1) << 16) + a2 * b2) >>> 0;
}