Skip to content

Instantly share code, notes, and snippets.

Avatar
🕘
JST +09:00

Yoshiaki Sugimoto ysugimoto

🕘
JST +09:00
View GitHub Profile
@ysugimoto
ysugimoto / ats
Last active Jul 12, 2016
Artisan task selector-runner ( Depend peco )
View ats
#!/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 Oct 7, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// 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 Apr 7, 2017
cocos2d-x simple websocket wrapper class
View SWebSocket.cpp
//
// SWebSocket.cpp
//
// Created by Yoshiaki Sugimoto on 2014/08/04.
//
//
#include "SWebSocket.h"
USING_NS_CC;
@ysugimoto
ysugimoto / getImage.cpp
Last active Jun 1, 2017
Exxternal image shows in Sprite on cocos2d-x v3.x
View getImage.cpp
#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 Aug 23, 2017
qdmail for PHP5.3+
View qdmail.php
<?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 Oct 26, 2017 — forked from shinofara/generate.sh
SSL GENERATE MAC ONLY
View generate.sh
#!/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 Feb 3, 2018
Find up `Makefile` and run it
View fumake
#!/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 Mar 10, 2018
Release tag version with some artifacts
View github-release.sh
#!/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 / npm-run-completion.sh
Created Aug 21, 2017
Bash-completion for `npm run` command
View npm-run-completion.sh
#!/bin/bash
# This is bash-completion for 'npm run' command.
# Find up package.json and completion 'npm scripts'.
_npm_run_completion() {
CURRENT="${COMP_WORDS[COMP_CWORD]}"
SUBCOMMAND="${COMP_WORDS[COMP_CWORD-1]}"
if [ "${SUBCOMMAND}" != "run" ]; then
return
fi
@ysugimoto
ysugimoto / mtk
Created Mar 18, 2013
mtkするやつ
View 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円)'