Skip to content

Instantly share code, notes, and snippets.

View hakatashi's full-sized avatar
🈚
idgaf

Koki Takahashi hakatashi

🈚
idgaf
View GitHub Profile
@bartaz
bartaz / gist:1119041
Created August 1, 2011 21:22
Convert JavaScript number to string of 64bit double precision floating point representation (IEEE 754)
// Convert a JavaScript number to IEEE-754 Double Precision
// value represented as an array of 8 bytes (octets)
//
// http://cautionsingularityahead.blogspot.com/2010/04/javascript-and-ieee754-redux.html
function toIEEE754(v, ebits, fbits) {
var bias = (1 << (ebits - 1)) - 1;
// Compute sign, exponent, fraction
@gre
gre / EasingFunctions.json
Last active January 11, 2023 10:28
DEPRECATED Please use http://github.com/gre/bezier-easing for latest vrrsion.
{
"ease": [0.25, 0.1, 0.25, 1.0],
"linear": [0.00, 0.0, 1.00, 1.0],
"ease-in": [0.42, 0.0, 1.00, 1.0],
"ease-out": [0.00, 0.0, 0.58, 1.0],
"ease-in-out": [0.42, 0.0, 0.58, 1.0]
}
@frsyuki
frsyuki / my_thoughts_on_msgpack.md
Created June 11, 2012 02:36
My thoughts on MessagePack

My thoughts on MessagePack

Hi. My name is Sadayuki "Sada" Furuhashi. I am the author of the MessagePack serialization format as well as its implementation in C/C++/Ruby.

Recently, MessagePack made it to the front page of Hacker News with this blog entry by Olaf, the creator of the Facebook game ZeroPilot. In the comment thread, there were several criticisms for the blog post as well as MessagePack itself, and I thought this was a good opportunity for me to address the questions and share my thoughts.

My high-level response to the comments

To the best of my understanding, roughly speaking, the criticisms fell into the following two categories.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
var FFT = (function() {
"use strict";
var FFT = function() {
initialize.apply(this, arguments);
}, $this = FFT.prototype;
var FFT_PARAMS = {
get: function(n) {
return FFT_PARAMS[n] || (function() {
@rosylilly
rosylilly / gist:3401612
Created August 20, 2012 06:40
先輩と覚える HTTP ステータスコード

先輩に学ぶ HTTP Status Code

超雑にまとめました。修正してください。

登場人物

  • アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
  • 後輩: 頼んでばっかしで役に立たない。
  • サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
  • プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。
@zonuexe
zonuexe / README.md
Last active January 6, 2018 14:36
秀丸で現代仮名遣いを正字正かなに

ry2sei(假) v0.2tp(20070501)

現代仮名遣の文章を正字正かなに書換へるマクロです。 淒い文法解析をするわけではなくて、單純な置換の組合せしかしてゐません。 未完成かつ開發中ですが、 "それなり" な精度で變換します。

動作環境
秀丸(たぶんV6.0以降必須)

仕樣

@subzey
subzey / gist:3830251
Created October 3, 2012 22:19
UnicodeEscapeSequence in Identifier

According to ECMA 262 both versions 3 and 5 variable name may contain chars escaped by \uHHHH. So var ы; and var \044b; is essentially the same.

The Syntax section there also states that variable name cannot be equal to any of the reserved words. So var this; is surely invalid.

But what happens if var \0074his is encountered?

Specs doesn't clearly explain this. "Unicode escape sequences are also permitted in an IdentifierName, where they contribute a single character to the IdentifierName...". Great, but does it mean that escape sequence must be unescaped prior to comparsion with reserved kerwords or not?

In other words, is \0074his the same as this?

@hayajo
hayajo / changelog_en.md
Last active May 3, 2024 08:29
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

@manse
manse / pixiv_favorites.php
Last active July 28, 2022 07:48
Pixivのお気に入りユーザーの新着イラストをRSSリーダーで読めるようにします。
<?php
/* ----- configure ----- */
//Pixiv ID
define('PIXIV_ID', 'your_pixiv_id');
//Pixiv password
define('PIXIV_PASSWORD', 'your_pixiv_password');
/* ----- configure ----- */