Skip to content

Instantly share code, notes, and snippets.

View turusuke's full-sized avatar
🏠
Working from Home

turusuke turusuke

🏠
Working from Home
View GitHub Profile
@turusuke
turusuke / PointAngle.js
Created June 16, 2013 05:32
CreateJSのPointクラスでオブジェクト間の角度を取得できるメソッド getDigree(度数法)とgetRadian(ラジアン)を利用できるようにしたプラグイン。
/**
* User: turusuke
* Date: 13/06/16
* version: 0.1
*/
(function(window) {
if (!createjs || !createjs.Point) {
return;
}
@turusuke
turusuke / README.md
Last active December 20, 2015 05:19
UFO画像

色々使えるUFO画像

#!/bin/sh
DBNAME="" #データベース名
DBUSER="" #データベースユーザ名
DBPASS="" #データベースパス
DBHOST="" #データベースホスト
DBPREFIX="" #テーブルのプレフィックス ex. wp_
# ############
<?php
$api_token = 'YOUR_API_TOKEN';
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_URL, 'https://www.toggl.com/api/v8/time_entries/start');
curl_setopt($ch, CURLOPT_USERPWD, $api_token . ": api_token");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
@turusuke
turusuke / zsh_powerline.md
Created September 26, 2016 17:06
Zsh をデフォルトに設定して Powerline を適用するまで

Zsh

// Zsh起動
$ zsh
 
// リポジトリをclone
$ git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
 
// 既存の設定ファイルを退避(必要な場合)
#!/bin/zsh
# Usage ./get-pr-review.sh :number(ex.120)
# dependencies jq -> https://stedolan.github.io/jq/
# {
# "user": "turusuke",
# "filePath": "main.js:14",
# "body": "いいと思います!",
# "arg": "https://github.com/owner/repo/pull/540#discussion_11111"
@turusuke
turusuke / share_chatwork-bookmarklet.js
Last active December 25, 2017 08:04
今見ているページをチャットワークで共有
javascript:(function()%7B(()%20%3D%3E%20%7Bconst%20title%20%3D%20encodeURIComponent(document.title)%3Bconst%20url%20%3D%20encodeURIComponent(window.location)%3Bconst%20w%20%3D%20600%3Bconst%20h%20%3D%20500%3Bconst%20popup%20%3D%20%60https%3A%2F%2Fwww.chatwork.com%2Fpackages%2Fshare%2Flogin.php%3Furl%3D%24%7Burl%7D%26title%3D%24%7Btitle%7D%60%3Bconst%20l%20%3D%20screen.width%20%2F%202%20-%20w%20%2F%202%3Bconst%20t%20%3D%20screen.height%20%2F%202%20-%20h%20%2F%202%3Bwindow.open(popup%2C%20%22ChatWorkShare%22%2C%20%60resizable%2Cscrollbars%2Cstatus%2Cwidth%3D%24%7Bw%7D%2C%20height%3D%24%7Bh%7D%2Cleft%3D%24%7Bl%7D%2Ctop%3D%24%7Bt%7D%60)%3B%7D)()%7D)()
  • 地球防衛軍5
  • Assassin's Creed® Origins
  • KINGDOM HEARTS 0.2 Birth by Sleep - A fragmentary passage -
  • FINAL FANTASY XV
  • ニューダンガンロンパV3 みんなのコロシアイ新学期
  • WATCH_DOGS® 2
  • ドラゴンクエストXI 過ぎ去りし時を求めて
  • Destiny 2
  • THE KING OF FIGHTERS XIV
  • BIOHAZARD 7 resident evil
console.log(1);
console.log(2);
@turusuke
turusuke / alfred_output_sample.sh
Last active August 5, 2018 15:26
alfred の script filter で出力するための最低限の値達
cat << EOB
{"items": [
{
"valid": true,
"uid": "${txt}",
"title": "${txt}",
"arg": "${txt}",
"autocomplete": "${txt}"
}
]}