View async_await_js.html
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
<html> | |
<body onload="init2()"> | |
<script type="application/javascript;version=1.7"> | |
/*===========================================================================* | |
* Test Implementation of .NET 5 `await` and `async` in JavaScript 1.7 | |
*===========================================================================* | |
* !!!!! This sample only works on Firefox !!!!! | |
* (Other browsers don't support `yield` statement) | |
*===========================================================================* | |
* use `async` function like: |
View replace_glyph.py
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import fontTools.ttLib.tables | |
import fontTools.ttLib | |
s1 = u"コピペできない文章です!! 嘘じゃないよ" | |
s2 = u"ほら。無理でしょ?絶対に不可能なんです!" | |
tt = fontTools.ttLib.TTFont("mplus-2p-regular.ttf") |
View parse_log.pl
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
use strict; | |
use warnings; | |
use HTTP::BrowserDetect; | |
use Data::Dumper; | |
use DateTime::Format::HTTP; | |
use DateTime::Duration; | |
my $browser = new HTTP::BrowserDetect(""); | |
my $total = 0; |
View HelloSpace.as
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
// キラキラ3D Typography | |
//----------------------------------------------------- | |
// 次の2つの組み合わせ+αです | |
// - HelloWorld3D | |
// http://wonderfl.net/code/50225c9944de6206a3813f515fce2c51fd56ab23 | |
// - キラキラPixel3D! in Native Flash 10 3D API | |
// http://wonderfl.net/code/8283df8a03a8f3c290bc88a056b44b3c6084b123 | |
package { | |
import flash.display.*; | |
import flash.events.Event; |
View Foo.as
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{ | |
import flash.display.*; | |
import flash.events.Event; | |
import flash.text.*; | |
import flash.filters.*; | |
import flash.geom.*; | |
import caurina.transitions.Tweener; | |
[SWF(width=640, height=360)] | |
public class Foo extends Sprite{ |
View test.lua
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
local LrApplication = import 'LrApplication' | |
local catalog = LrApplication.activeCatalog() | |
local size = 0 | |
local pathes = "" | |
local photos = catalog:getMultipleSelectedOrAllPhotos() | |
for k,photo in ipairs(photos) do | |
size = size + photo:getRawMetadata("fileSize") | |
pathes = pathes .. "\n" .. photo:getRawMetadata("path") | |
end |
View crlf-test.txt
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
End of Line Character Test | |
Which do you like CR LF or LF? | |
This file uses "CR LF"!!!! | |
Clone me! |
View peco-select-git-restore.sh
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 peco-select-git-restore() { | |
git status --porcelain | \ | |
peco --query "$LBUFFER" | \ | |
cut -f 2- -d ' ' | \ | |
while read FILE; do | |
git clean -f -- "$FILE" | |
if [ -f "$FILE" ]; then | |
git checkout -- "$FILE" | |
fi | |
done |
View redcarpet-header-bug.rb
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
# reproducable code for https://github.com/vmg/redcarpet/issues/474 | |
# (redcarpet-3.3.3, Windows 10 x64) | |
require 'redcarpet' | |
class TestRenderer < Redcarpet::Render::HTML | |
def emphasis(text) | |
"a" * 117 | |
end | |
end |
View rgb.go
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 ( | |
"fmt" | |
"image" | |
"image/color" | |
"image/gif" | |
"math" | |
"os" | |
) |