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
package main | |
import ( | |
"context" | |
"log" | |
firebase "firebase.google.com/go" | |
"firebase.google.com/go/messaging" | |
) |
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
(async () => { | |
const f = await fetch(location.href); | |
const html = await f.text(); | |
const index = html.indexOf('"startTimestamp'); | |
if (index < 0) { | |
console.log('not found startTimestamp'); | |
return; | |
} | |
const count = html.indexOf(',', index) - index; |
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
#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) | |
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member | |
using System.Threading; | |
using UniRx.Async; | |
namespace UniRx | |
{ | |
public static class UniTaskCancellationTokenExtensions | |
{ |
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
package main | |
import ( | |
"log" | |
"time" | |
) | |
func temp(quitChan chan bool) { | |
for i := 0; i <= 1000000; i++ { | |
select { |
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
@ECHO OFF | |
IF NOT "%~f0" == "~f0" GOTO :WinNT | |
@"ruby.exe" "C:/Users/emachnic/GitRepos/railsinstaller-windows/stage/Ruby2.1.0/bin/rails" %1 %2 %3 %4 %5 %6 %7 %8 %9 | |
GOTO :EOF | |
:WinNT | |
@"ruby.exe" "%~dpn0" %* |
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
package main | |
import ( | |
ole "github.com/go-ole/go-ole" | |
"github.com/go-ole/go-ole/oleutil" | |
"log" | |
"fmt" | |
) | |
func main() { |
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
# split windows like vim | |
# vim's definition of a horizontal/vertical split is reversed from tmux's | |
bind s split-window -v | |
bind v split-window -h | |
# move around panes with hjkl, as one would in vim after pressing ctrl-w | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R |
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
function Promise(callback, immudiate) { | |
// Promiseとcallbackを関連付ける | |
this.callback = callback; | |
// immudiateにfalse以外のものが渡されたとき(引数を一つしか渡さなかった場合も)はすぐにinvokeを呼び出す | |
if (immudiate !== false) { | |
this.invoke(); | |
} | |
} |
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
require "yaml" | |
require "pp" | |
h = [] | |
hash = {} | |
File.read("unitychan_dynamic.prefab").each_line do |line| | |
match = line.match(/--- !u!\d+ &(\d+)/) | |
if match.nil? | |
h << line | |
else |
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
/** Packet format | |
* 4 bytes data size (x) | |
* x bytes data | |
*/ | |
var sb = new StreamBuffer(); | |
var requireLength = 0; | |
var state = 0; | |
client.on('data', function (data) { |
NewerOlder