Skip to content

Instantly share code, notes, and snippets.

View ysugimoto's full-sized avatar
🕘
GMT+9 JST

Yoshiaki Sugimoto ysugimoto

🕘
GMT+9 JST
View GitHub Profile
@ysugimoto
ysugimoto / ats
Last active July 12, 2016 02:06
Artisan task selector-runner ( Depend peco )
#!/bin/sh
# Artisan ( Laravel's CLI tool ) find-up, selectable runner
# @depend
# peco - https://github.com/peco/peco
PHP=`which php`
CWD=`pwd`
ARTISAN="artisan"
COMMAND=
@ysugimoto
ysugimoto / 0_reuse_code.js
Created October 7, 2016 18:35
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ysugimoto
ysugimoto / SWebSocket.cpp
Last active April 7, 2017 09:22
cocos2d-x simple websocket wrapper class
//
// SWebSocket.cpp
//
// Created by Yoshiaki Sugimoto on 2014/08/04.
//
//
#include "SWebSocket.h"
USING_NS_CC;
@ysugimoto
ysugimoto / getImage.cpp
Last active June 1, 2017 10:41
Exxternal image shows in Sprite on cocos2d-x v3.x
#include "network/HttpRequest.h"
#include "network/HttpClient.h"
#include "network/HttpResponse.h"
using namespace cocos2d::network;
HttpRequest* request = new HttpRequest();
request->setUrl("http://example.com/external/image.png");
request->setRequestType(HttpRequest::Type::GET);
request->setResponseCallback([this](HttpClient *sender, HttpResponse *response) {
@ysugimoto
ysugimoto / qdmail.php
Last active August 23, 2017 14:11
qdmail for PHP5.3+
<?php
/**
* Qdmail ver 1.2.6b
* E-Mail for multibyte charset
*
* PHP versions 4 and 5 (PHP4.3 upper)
*
* Copyright 2008, Spok in japan , tokyo
* hal456.net/qdmail : http://hal456.net/qdmail/
* & CPA-LAB/Technical : http://www.cpa-lab.com/tech/
@ysugimoto
ysugimoto / generate.sh
Created October 26, 2017 16:53 — forked from shinofara/generate.sh
SSL GENERATE MAC ONLY
#!/bin/bash
set -eu
atexit() {
[[ -n $tmpdir ]] && rm -fr "$tmpdir"
[[ -n $sslconf ]] && rm -fr "$sslconf"
}
tmpdir=`mktemp -d`
sslconf=`mktemp`
trap atexit EXIT
trap 'trap - EXIT; atexit; exit -1' SIGHUP SIGINT SIGTERM
@ysugimoto
ysugimoto / fumake
Last active February 3, 2018 06:02
Find up `Makefile` and run it
#!/bin/sh
MPATH=$PWD
MAKECOMMAND=$(which make)
if [ "${MAKECOMMAND}" = "" ]; then
echo "make command could't find in your \$PATH. Did you install it?"
exit 1
fi
@ysugimoto
ysugimoto / github-release.sh
Last active March 10, 2018 05:51
Release tag version with some artifacts
#!/bin/sh
### Github create release script
### This script requires following UNIX commands:
### - jq
### - file
### - curl
### - basename
### Those commands might not be installed on CI environment due to tiny OS package,
### So probably you need to install manually.
@ysugimoto
ysugimoto / mtk
Created March 18, 2013 08:37
mtkするやつ
#!/bin/sh
echo '玉子とじラーメン 650円(大盛800円)'
echo '玉子とじ担々麺 800円(大盛980円)'
echo 'もやしそば 750円(大盛980円)'
echo 'ワンタンメン 750円(大盛980円)'
echo '叉焼麺 800円(大盛980円)'
echo '天津麺 750円(大盛980円)'
echo '五目そば 750円(大盛980円)'
echo '酸辣湯麺 850円(大盛1000円)'
@ysugimoto
ysugimoto / detect_nullbyte.go
Last active August 2, 2018 08:45
Detect surrogate pair on Golang
package main
import (
"fmt"
)
func detect_nullbyte(str string) bool {
for _, b := range str {
if b == '\u0000' {
return true