Skip to content

Instantly share code, notes, and snippets.

View benigumocom's full-sized avatar
🏠
🙆

chanzmao benigumocom

🏠
🙆
View GitHub Profile
.gradle
**/build/
!src/**/build/
# Ignore Gradle GUI config
gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Log/OS Files
*.log
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
@benigumocom
benigumocom / show.gitignore
Last active February 11, 2023 13:23
AndroidStudio project default template .gitignore
❯ find . -name .gitignore
./app/.gitignore
./.gitignore
./.idea/.gitignore
❯ cat .idea/.gitignore
# Default ignored files
/shelf/
/workspace.xml
@benigumocom
benigumocom / rename-git-branch.sh
Last active February 11, 2023 05:03
Rename Git branch master to main
git status
# On branch master
# Your branch is up to date with 'origin/master'.
#
# nothing to commit, working tree clean
git branch -a
# * master
# remotes/origin/HEAD -> origin/master
# remotes/origin/master
@benigumocom
benigumocom / find-androidstudio-embedded-jdk.sh
Last active January 28, 2023 09:48
Find Android Studio Embedded JDK Home Paths
#!/bin/bash
IFS=$'\n' apps=$(mdfind kMDItemCFBundleIdentifier="com.google.android.studio*")
for app in $apps
do
# echo "$app"
home=$(find "$app" | grep -E "/(jdk|jbr)/Contents/Home$")
version=$("${home}/bin/java" --version)
echo "\"$home\""
@benigumocom
benigumocom / Japanese Era
Last active January 1, 2024 10:15
【Python】2022年 = 令和4年 = 平成34年 = 昭和97年 というような 西暦 - 元号 対照表 👉 https://android.benigumo.com/20221220/python-ad-japanese-gengo/
ad reiwa heisei showa
---- ------- -------- -------
2024 6 (36) (99)
2023 5 (35) (98)
2022 4 (34) (97)
2021 3 (33) (96)
2020 2 (32) (95)
2019 1 31 (94)
2018 30 (93)
2017 29 (92)
// live template expression
// groovyScript("/absolute/path/to/inline.groovy", clipboard());
def cb = _1
def ls = System.lineSeparator()
return cb.split(ls).collect { l ->
def w = l.split("\"", -1)
if (w.size() == 3) { // single quoted string per a line
def s = w[1].split(":")
#!/usr/bin/env python
import pyperclip
def parse(source):
parsed = list(map(lambda s: s.strip().split(), source.splitlines()))
parsed = list(map(lambda s: [s[0], s[1].strip('"').strip('\'').split(':')], parsed))
return parsed