Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View mugifly's full-sized avatar
🏠
Working from home

Masanori Ohgita mugifly

🏠
Working from home
View GitHub Profile
@mugifly
mugifly / looxu-b50n-tips-for-arch-linux.md
Last active March 21, 2018 17:53
Tips for Arch Linux on LOOX U/B50N

Tips for Arch Linux on LOOX U/B50N

I using the LOOX U with using Arch Linux + LXDE. It's fairly comfortable.

Change the keymap

$ sudo localectl set-x11-keymap jp pc106
$ logout

Calibrate the touchscreen

@mugifly
mugifly / Dockerfile
Created August 18, 2016 16:27
Dockerfile for Build and CI of Android Projects - Included: fb-adb command, disabling system animation
FROM java:8
MAINTAINER Masanori Ohgita
# NOTE: This Dockerfile was forked from following projects.
# https://github.com/denlabo/dockerfile-android-project - Modified by Ohgita on denLabo LLC
# https://github.com/gfx/docker-android-project - Authored by FUJI Goro (MIT License)
ENV DEBIAN_FRONTEND noninteractive
# Install dependencies
@mugifly
mugifly / adb-android-disable-animation.sh
Last active December 8, 2022 22:40
Disable the animation of Android Virtual Device using adb command
# For Android JellyBean and newer device
adb shell content update --uri content://settings/system --bind value:s:0.0 --where 'name="window_animation_scale"'
adb shell content update --uri content://settings/system --bind value:s:0.0 --where 'name="transition_animation_scale"'
adb shell content update --uri content://settings/system --bind value:s:0.0 --where 'name="animator_duration_scale"'
# For Android ICS and older device
adb shell "echo \"update system set value=0.0 where name='window_animation_scale';\" | sqlite3 /data/data/com.android.providers.settings/databases/settings.db"
adb shell "echo \"update system set value=0.0 where name='transition_animation_scale';\" | sqlite3 /data/data/com.android.providers.settings/databases/settings.db"
@mugifly
mugifly / docker-clean.sh
Created August 18, 2016 07:17
Cleanup Script for Docker Images and Containers
#!/bin/sh
echo -e "-- Removing exited containers --\n"
docker ps --all --quiet --filter="status=exited" | xargs --no-run-if-empty docker rm --volumes
echo -e "\n\n-- Removing untagged images --\n"
docker rmi --force $(docker images | awk '/^<none>/ { print $3 }')
echo -e "\n\n-- Removing volume directories --\n"
docker volume rm $(docker volume ls --quiet --filter="dangling=true")
@mugifly
mugifly / circle.yml
Last active June 28, 2016 15:14
Test of Perl project (dependency managed using cpanm & carton) on Circle-CI
machine:
environment:
# Path
PATH: "$PATH:/home/$USER/perl5/bin"
# cpanm - Install destination of libraries
PERL_CPANM_OPT: "--local-lib=/home/$USER/perl5"
# perl - Include path
PERL5LIB: "/home/$USER/perl5/lib/perl5:$PERL5LIB"
dependencies:
@mugifly
mugifly / circle.yml
Last active March 25, 2021 13:48
Faster test & Build of Android Studio Project (Gradle Project) on Circle-CI.
machine:
java:
version: oraclejdk8
environment:
# Java options
JAVA_OPTS: "-Xms512m -Xmx2048m"
# ADB options
ADB_INSTALL_TIMEOUT: 5000
dependencies:
@mugifly
mugifly / magnum-ci-build-android-apk-and-post-to-slack.md
Last active November 24, 2017 11:40
Build of Android Studio Project and Post the apk to Slack from Magnum CI

Build of Android Studio Project and Post the apk to Slack from Magnum CI

  • Build the Android Studio Project (Gradle Project) which exist on your Git repository.
  • Upload the generated apk file to Slack.

Basic Setup

  • Name: YOUR-REPOSITORY-NAME
  • Repository URL: git@github.com:XXX/YYY.git
  • Provider: Github
  • Source control: Git
  • Project type: Generic
@mugifly
mugifly / set-le-certs-to-dokku.sh
Last active May 15, 2016 12:33
Setup Script for the Let's Encrypt Certificate to Dokku apps
#!/bin/bash
# Setting Script for Let's Encrypt Certificate for Dokku apps
# Path of Let's Encrypt command
PATH_LE="/root/letsencrypt/"
# Base domain of dokku apps
DOKKU_BASE_DOMAIN="example.com"
# App names
function test () {
postToSlack('Hello!');
}
function postToSlack (text) {
var SLACK_WEBHOOK_URL = 'https://hooks.slack.com/services/XXXXX/YYYYY/ZZZZZ';
@mugifly
mugifly / make-mysql-db-and-user.pl
Created February 24, 2016 06:38
MySQL Database and User Generator
#!/usr/bin/env perl
print "MySQL Database and User Generator\n";
print "Input database name: ";
my $db_name = <STDIN>;
chomp $db_name;
if (length($db_name) <= 0) {
exit 0;
}