Skip to content

Instantly share code, notes, and snippets.

🤔
Thinking

Hajime Hoshi hajimehoshi

🤔
Thinking
Block or report user

Report or block hajimehoshi

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
View test.dart
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
var x = 0;
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
x++;
View test.html
<!DOCTYPE html>
<canvas id="canvas" width="512" height="512"></canvas>
<script>
window.addEventListener('load', () => {
const canvas = document.getElementById('canvas');
const gl = canvas.getContext('webgl');
gl.viewport(0, 0, 512, 512);
var i = 0;
let f = () => {
setTimeout(() => {
View v8.patch
diff --git a/include/v8.h b/include/v8.h
index 3275d97c43..5d44b30a89 100644
--- a/include/v8.h
View pre-commit
#!/bin/sh
# Copyright 2012 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# git gofmt pre-commit hook
#
# To use, store as .git/hooks/pre-commit inside your repository and make sure
# it has execute permissions.
#
View .bash_profile
export PS1='\[\033[40;1;32m\]\u\[\033[2;32m\]@\[\033[0m\]\[\033[40;32m\]\h \[\033[1;36m\]\w\[\033[0m\] \n\\$ '
export PATH=/usr/local/go/bin:/usr/local/bin:$PATH
export PATH=~/bin:$PATH
export GOPATH=~/go
export PATH=~/go/bin:$PATH
# export PATH=/usr/local/texlive/2014basic/bin/universal-darwin:$PATH
# export PATH=~/TypeScript/bin:$PATH # installed by `jake LKG`
View micropolis.md
                  +----+
      +----++----+| R  |
+----+| R  || R  |+----+
| R  |+----++----+==+----+
+----+==+----++----+| R  |
  +----+| R  || R  |+----+
  | R  |+----++----++----+
  +----++----++----+| R  |
  +----+| R  || R  |+----+
View resampling.go
func (p *player) resample() {
inL, inR := toLR(p.buf)
if len(inL) != len(inR) {
panic("oto: len(inL) must == len(inR)")
}
s := p.context.Get("sampleRate").Int()
if p.sampleRate == s {
p.buf = nil
p.bufL = append(p.bufL, inL...)
View map.js
const m = new Map();
const a = Object.prototype;
m[a] = 'This is a'
const b = {};
console.log(m[b]);
View nil.go
func isNil(v interface{}) bool {
if v == nil {
return true
}
switch rv := reflect.ValueOf(v); rv.Kind() {
case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.Interface, reflect.Slice:
return rv.IsNil()
}
return false
}
View c++.txt
loop ;; label = @1
get_local 0
f32.const 0x0p+0 (;=0;)
f32.store
get_local 5
f32.const 0x0p+0 (;=0;)
f32.store
get_local 2
f32.const 0x1p+0 (;=1;)
f32.store
You can’t perform that action at this time.