Skip to content

Instantly share code, notes, and snippets.

View typeon's full-sized avatar
no problem.

sangbae Kang typeon

no problem.
View GitHub Profile
{
"src_folders" : ["examples/tests"],
"output_folder" : "examples/reports",
"custom_commands_path" : "",
"custom_assertions_path" : "",
"globals_path" : "",
"selenium" : {
"start_process" : true,
"server_path" : "PATH TO YOUR SELENIUM JAR",
@typeon
typeon / nicstat.sh
Created September 8, 2017 07:43
nicstat.sh
#!/bin/bash
#
# script for network traffic statistics
#
# 1.0.0 - 2017.09.08
#
# Copyleft by typeon@gmail.com
#
if [ "x$1" != "x" ]; then
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
import sys
print('current cmd encoding : ', sys.stdout.encoding)
# - ー, ・, 収, 録, 覧 - UnicodeEncodeError: cp949 codec cannot encode char.
#
str = 'ー ・ このグリフを収録するグループおよび引用するドキュメント一覧'
@typeon
typeon / sublimetext.json
Last active August 2, 2016 13:19
Shortcut to move cursor out of parenthesis, quotes, brackets
{ "keys": ["tab"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "following_text", "operator": "regex_contains", "operand": "^)\"\\]]", "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false }
]
},
#!/bin/bash
# - fork한 original source를 my repository에 merge시켜서 최신버전을 유지시킨다.
git remote add upstream ORIGINAL_REPOSITORY_URL
git fetch upstream
git checkout master
# merge를 하던지.
git merge upstream/master
# rebase를 하던지.
git rebase upstream/master
// _MSC_VER
//
MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015)
MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013)
MSVC++ 11.0 _MSC_VER == 1700 (Visual Studio 2012)
MSVC++ 10.0 _MSC_VER == 1600 (Visual Studio 2010)
MSVC++ 9.0 _MSC_VER == 1500 (Visual Studio 2008)
MSVC++ 8.0 _MSC_VER == 1400 (Visual Studio 2005)
MSVC++ 7.1 _MSC_VER == 1310 (Visual Studio 2003)
MSVC++ 7.0 _MSC_VER == 1300
# create user, grant and flush
#
create user 'mysql'@'%' identified by '**';
create user 'mysql'@'localhost' identified by '**';
grant all privileges on bmtdb.* to 'mysql'@'%';
grant all privileges on bmtdb.* to 'mysql'@'localhost';
flush privileges;
@typeon
typeon / gist:714965119b5fa1579e8c
Created April 16, 2015 23:27
php type casting
The casts allowed are:
- (int), (integer) - cast to integer
- (bool), (boolean) - cast to boolean
- (float), (double), (real) - cast to float
- (string) - cast to string
- (array) - cast to array
- (object) - cast to object
- (unset) - cast to NULL (PHP 5)
trait PrintFunctionality {
public function myPrint() { echo 'Hello'; }
}
class MyClass {
// Insert trait methods
use PrintFunctionality;
}
$o = new MyClass();
$o->myPrint(); // "Hello"
@typeon
typeon / gist:e140859b836c82223f49
Last active August 29, 2015 14:19
php type hinting
PHP relies on the proper documentation of functions for developers to know what
arguments a function can take. To simplify this PHP 5 introduced type hinting, which
allows a function to specify the type of arguments it accepts. Allowed types include
classes, interfaces and the pseudo types array and callable.
*ClassName, interfaceName, array, Callable*