Skip to content

Instantly share code, notes, and snippets.

@kenmlee
kenmlee / AdbCommands
Created March 30, 2023 09:38 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@kenmlee
kenmlee / -setup-windows-wsl-devenv.md
Created May 1, 2022 01:09 — forked from leodutra/-setup-windows-wsl-devenv.md
Install and Setup Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

Setup Windows Subsystem 2 for Linux

Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

To setup native Linux, see this gist

Preview

Requirements

@kenmlee
kenmlee / proxy.md
Created August 16, 2021 07:36 — forked from yougg/proxy.md
complete ways to set http/socks/ssh proxy environment variables

set http or socks proxy environment variables

# set http proxy
export http_proxy=http://PROXYHOST:PROXYPORT

# set http proxy with user and password
export http_proxy=http://USERNAME:PASSWORD@PROXYHOST:PROXYPORT

# set http proxy with user and password (with special characters)
public List<Picture> getAllPictures() {
ArrayList<Picture> pictures = new ArrayList<Picture>();
Range range = _document.getOverallRange();
for (int i = 0; i < range.numCharacterRuns(); i++) {
CharacterRun run = range.getCharacterRun(i);
if (run==null) {
continue;
}
public static void main(String[] args) throws Exception
{
String dataPath = "src/featurescomparison/workingwithimages/extractimagesfromdocument/data/";
HWPFDocument doc = new HWPFDocument(new FileInputStream(
dataPath + "document.doc"));
List<Picture> pics = doc.getPicturesTable().getAllPictures();
for (int i = 0; i < pics.size(); i++)
{
private void extractImageText(XHTMLContentHandler xhtml, HWPFDocument document) {
if (Config.inst().getProp(ConfigBool.ENABLE_IMAGE_OCR)) {
TikaImageHelper helper = new TikaImageHelper(metadata);
try {
List<Picture> pictures2 = document.getPicturesTable().getAllPictures();
for (Picture picture : pictures2) {
ByteArrayInputStream imageData = new ByteArrayInputStream(
picture.getContent());
helper.addImage(ImageIO.read(imageData));
}
public static void main(String[] args) throws Exception
{
HWPFDocument doc = new HWPFDocument(new FileInputStream(
"data/document.doc"));
List<Picture> pics = doc.getPicturesTable().getAllPictures();
for (int i = 0; i < pics.size(); i++)
{
Picture pic = (Picture) pics.get(i);
@kenmlee
kenmlee / rxjs-diagrams.md
Created September 20, 2018 14:40 — forked from PCreations/rxjs-diagrams.md
Super Intuitive Interactive Diagrams to learn combining RxJS sequences by Max NgWizard K
@kenmlee
kenmlee / multi-git.md
Created May 3, 2018 02:17 — forked from rosswd/multi-git-win.md
Setting up a Github and Bitbucket account on the same computer.

Setting up github and bitbucket on the same computer

Github will be the main account and bitbucket the secondary.

Create SSH Keys

ssh-keygen -t rsa -C "github email"

Enter passphrase when prompted. If you see an option to save the passphrase in your keychain, do it for an easier life.

@kenmlee
kenmlee / search-box.component.css
Last active March 16, 2017 13:06
components with input and output
.btn-clear {
background: #DE363F;
color: white;
font-weight: bold;
border-radius: 4px;
}