Skip to content

Instantly share code, notes, and snippets.

View ChiftKey's full-sized avatar

HyeonIl Cho ChiftKey

  • Busan, South Korea
View GitHub Profile
@ChiftKey
ChiftKey / .tmux.conf
Created May 10, 2021 02:00 — forked from william8th/.tmux.conf
Tmux open new pane in same directory
# Set the control character to Ctrl+Spacebar (instead of Ctrl+B)
set -g prefix C-space
unbind-key C-b
bind-key C-space send-prefix
# Set new panes to open in current directory
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
@ChiftKey
ChiftKey / diff-so-fancy-install.txt
Last active June 28, 2021 20:48 — forked from gmolveau/diff-so-fancy-install.sh
ubuntu/debian diff-so-fancy install
# choose a folder that is in your PATH or create a new one
mkdir -p ~/.bin
# clone the source code to local path
git clone https://github.com/so-fancy/diff-so-fancy ~/.bin/diffsofancy_src
# make the script executable
chmod +x ~/.bin/diffsofancy_src/diff-so-fancy
ln -s ~/.bin/diffsofancy_src/diff-so-fancy ~/.bin/diff-so-fancy
@ChiftKey
ChiftKey / change-accessibility-settings-with-adb.md
Created October 12, 2020 08:11 — forked from mrk-han/change-accessibility-settings-with-adb.md
Enable and Disable Android Accessibility Settings from the Command Line using ADB (Font scale, talkback, color blind)

Using ADB to control Accessbility settings for easier testing with Android Emulators + Real Devices

It's a lot easier to test accessibility on the fly using ADB. This gist attempts to make the days of navigating through the Android device settings UI to change Accessibility settings obsolete.

These ADB commands will hopefully encourage Android developers to test and use their apps with common Accessiblility settings enabled.

Credit to James Nitsch for inspiring this, and for figuring out the put commands to enable these settings.

Font Scale (Font Size -- Testing Dynamic Text)

@ChiftKey
ChiftKey / SystemPropertiesProxy
Created May 13, 2020 05:23 — forked from crossle/SystemPropertiesProxy
Use the reflection invoke SystemProperites
import java.lang.reflect.Method;
public class SystemPropertiesProxy {
/**
* This class cannot be instantiated
*/
private SystemPropertiesProxy() {
}
$ mvn exec:java
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------------< com.tuyano:mvn-app >-------------------------
[INFO] Building mvn-app 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.5.0:java (default-cli) @ mvn-app ---
***** App class *****
@ChiftKey
ChiftKey / mysql-docker.sh
Created August 5, 2019 04:13 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@ChiftKey
ChiftKey / logback.xml
Last active July 30, 2019 02:20
android logback xml configuration example
<configuration>
<!-- 로그가 저장되는 디렉토리 지정-->
<property name="LOG_DIR" value="/sdcard/log" />
<property name="FILE_NAME" value="로그파일명"/>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- active log file -->
<file>${LOG_DIR}/${FILE_NAME}.txt</file>
<encoder>
<!--<pattern>%logger{35} - %msg%n</pattern>-->
@ChiftKey
ChiftKey / INSTALL.md
Created October 14, 2018 11:39 — forked from jpillora/INSTALL.md
Headless Transmission on Mac OS X
  1. Go to https://developer.apple.com/downloads/index.action and search for "Command line tools" and choose the one for your Mac OSX

  2. Go to http://brew.sh/ and enter the one-liner into the Terminal, you now have brew installed (a better Mac ports)

  3. Install transmission-daemon with

    brew install transmission
    
  4. Copy the startup config for launchctl with

    ln -sfv /usr/local/opt/transmission/*.plist ~/Library/LaunchAgents
    
@ChiftKey
ChiftKey / AdbCommands
Created August 23, 2018 04:32 — forked from Pulimet/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell