//list all packages
adb shell pm list packages
//list all android permissions
adb shell pm list permissions -d -g
This file contains 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
File imgFile = new File(image_path); //INTERNAL STORAGE path | |
if(imgFile.exists()){ | |
Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath()); | |
Uri internal = Uri.fromFile(imgFile); | |
try{ | |
Bitmap img = rotateImageIfRequired(myBitmap, internal); | |
}catch (IOException e) { | |
e.printStackTrace(); | |
} |
This file contains 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
# Your snippets | |
# | |
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
# expand the prefix into a larger code block with templated values. | |
# | |
# You can create a new snippet in this file by typing "snip" and then hitting | |
# tab. | |
# | |
# An example CoffeeScript snippet to expand log to console.log: | |
# |
This file contains 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
//only letters and numbers (no korean, no special chars) | |
$('.username').on('keyup', function(e){ | |
let val = $(this).val() | |
val = val.replace(/[^a-zA-Z0-9]/ig, '') | |
this.value = val | |
}) |
This file contains 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
//snippet to easily include three.js shader chunks in your custom shaders | |
replaceThreeChunkFn(a, b) { | |
return THREE.ShaderChunk[b] + '\n' | |
} | |
shaderParse(glsl) { | |
return glsl.replace(/\/\/\s?chunk\(\s?(\w+)\s?\);/g, this.replaceThreeChunkFn) | |
} |
This file contains 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
$('#my_form').submit(function(e) { | |
let validations = [ | |
{ | |
description: 'empty field', | |
status: $('.field').val().length != 0 ? true : false, | |
message: 'field xxx is empty' | |
} | |
] | |
let isFormValidated = true |
This file contains 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
cloneSkinnedMesh(){ | |
const skinnedMeshes = {} | |
this.original.traverse( child => { | |
if(child.isSkinnedMesh){ | |
skinnedMeshes[child.name] = child | |
} | |
}) | |
const cloneBones = {} | |
const cloneSkinnedMeshes = {} |
OlderNewer