Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Masanori Ohgita mugifly

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

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 Aug 18, 2016
Dockerfile for Build and CI of Android Projects - Included: fb-adb command, disabling system animation
View Dockerfile
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 Oct 30, 2019
Disable the animation of Android Virtual Device using adb command
View adb-android-disable-animation.sh
# 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 Aug 18, 2016
Cleanup Script for Docker Images and Containers
View docker-clean.sh
#!/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 Jun 28, 2016
Test of Perl project (dependency managed using cpanm & carton) on Circle-CI
View circle.yml
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 Jun 29, 2018
Faster test & Build of Android Studio Project (Gradle Project) on Circle-CI.
View circle.yml
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 Nov 24, 2017
Build of Android Studio Project and Post the apk to Slack from Magnum CI
View magnum-ci-build-android-apk-and-post-to-slack.md

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
Setup Script for the Let's Encrypt Certificate to Dokku apps
View set-le-certs-to-dokku.sh
#!/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
View google-forms-post-to-slack.js
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 Feb 24, 2016
MySQL Database and User Generator
View make-mysql-db-and-user.pl
#!/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;
}
You can’t perform that action at this time.