This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# [1] list packages | |
#adb shell pm list packages -f | grep game | grep samsung | |
# | |
#package:/system/priv-app/GameHome/GameHome.apk=com.samsung.android.game.gamehome | |
#package:/system/priv-app/GameTools_Dream/GameTools_Dream.apk=com.samsung.android.game.gametools | |
#package:/system/app/GameOptimizingService/GameOptimizingService.apk=com.samsung.android.game.gos | |
# [2] get package path | |
#adb shell pm path com.samsung.android.game.gamehome | |
#adb shell pm path com.samsung.android.game.gametools |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ajax_json(type, url, data, success_fn, failure_fn){ | |
let ajax_options = { | |
type: type, | |
url: url, | |
dataType: 'json', | |
contentType: 'application/json; charset=utf-8', | |
data: JSON.stringify(data), | |
success: function(resp){ | |
success_fn(resp); | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in range(10): | |
print('{:<10}: {}'.format('*'*(i+1), 'row %s' % (i+1))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/jiaaro/pydub/blob/master/pydub/audio_segment.py | |
with open(os.devnull, 'rb') as devnull: | |
p = subprocess.Popen(conversion_command, stdin=devnull, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
p_out, p_err = p.communicate() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/jiaaro/pydub/blob/master/pydub/audio_segment.py | |
if filename: | |
conversion_command += ["-i", filename] | |
stdin_parameter = None # <------------------------------------------- Look at this line !! | |
stdin_data = None | |
else: | |
if cls.converter == 'ffmpeg': | |
conversion_command += ["-read_ahead_limit", str(read_ahead_limit), | |
"-i", "cache:pipe:0"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# On Windows, running this from the binary produced by Pyinstaller | |
# with the ``--noconsole`` option requires redirecting everything | |
# (stdin, stdout, stderr) to avoid an OSError exception | |
# "[Error 6] the handle is invalid." | |
ret.update({'stdin': subprocess.PIPE, | |
'stderr': subprocess.PIPE, | |
'startupinfo': si, | |
'env': env }) | |
return ret |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
def validate_thai_filename(filename): | |
return re.sub('[^ก-๙a-zA-Z0-9.,_-]', '_', filename) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* https://stackoverflow.com/a/11544685/466693 */ | |
// focus on first element | |
$('.my-text').eq(0).focus(); | |
// onblur event | |
$('.my-text').blur(function (event) { | |
// do onblur stuff | |
// ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"globals" : | |
{ | |
"alwaysShowTabs" : true, | |
"defaultProfile" : "{09dc5eef-6840-4050-ae69-21e55e6a2e62}", | |
"initialCols" : 120, | |
"initialRows" : 30, | |
"keybindings" : | |
[ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
br = branch | |
co = checkout | |
[core] | |
autocrlf = input | |
editor = gvim <---- change editor command | |
[color] | |
diff = auto | |
status = auto | |
branch = auto |