Skip to content

Instantly share code, notes, and snippets.

View usagi's full-sized avatar
🍣
Sushi

USAGI/USAGI.NETWORK usagi

🍣
Sushi
View GitHub Profile
<?php
class c {
function __construct() { $this->x = 123; }
public $x;
}
$a = new c();
echo $a->x;
?>
var a = new function() { this.x = 123; };
console.log(a.x);
var c = function(){ this.x = 123; };
var a = new c();
console.log(a.x);
var b = new c;
console.log(b.x);
var x = {
aaa: 123,
bbb: 456,
ccc: 789,
};
console.log(x);
delete x.bbb;
console.log(x);
this.x = 123;
console.log(this);
var vector = function(x, y){
switch(arguments.length){
case 0: x = 0;
case 1: y = 0;
}
this.x = x;
this.y = y;
};
var my_object = function(p, v){
<!DOCTYPE html>
<meta charset="utf-8">
<title>ページ(=このファイル)全体としてのタイトル</title>
@usagi
usagi / hello.dart
Created May 10, 2012 21:33
hello.dart to hello.dart.js using frogc
main() {
var name = 'World';
print('Hello, ${name}!');
}
#!/bin/sh
function main(){
configure
run
}
function configure(){
echo 'いくつから?'
read range_begin
CC = g++
LD = g++
LDFLAGS =
CFLAGS=-g -Wall `pkg-config --cflags libfreenect` -lopengl32 -lglut32
LIBS = `pkg-config --libs libfreenect` -lGL -lGLU -lglut
OBJECTS = main.o
PROG = mycppview
all:$(PROG)