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 / 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 / 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 / blink.css
Last active April 25, 2018 06:30
CSS Blink for Webkit and others. (Chrome, Safari, Firefox (Gecko), IE, ...) CSSで擬似的なblinkを再現する簡単なTips。
@mugifly
mugifly / dokku-in-proxy.md
Last active July 6, 2018 06:41
Dokku in Proxy

Dokku in proxy

$ export http_proxy=http://example.com:8080/
$ export https_proxy=$http_proxy
$ sudo -E sh -c "echo 'Acquire::http::proxy \"$http_proxy\";' >> /etc/apt/apt.conf"
$ sudo -E sh -c "echo 'Acquire::https::proxy \"$https_proxy\";' >> /etc/apt/apt.conf"

$ wget https://raw.githubusercontent.com/progrium/dokku/v0.4.3/bootstrap.sh
$ sudo -E DOKKU_TAG=v0.4.3 bash bootstrap.sh
@mugifly
mugifly / angular-filters.js
Last active September 5, 2018 17:55
Angular JS little filters.
'use strict';
angular.module('foo', [])
.filter('substring', function() {
return function(str, start, end) {
return str.substring(start, end);
};
})
@mugifly
mugifly / detect-animated-gif.pl
Created August 9, 2015 17:34
Detector for animated GIF image (perl5)
#!/usr/bin/env perl
# Detector for animated GIF image (perl5)
# Based on http://d.hatena.ne.jp/namanamanamana/20090415/1239729068 Thanks.
use strict;
use warnings;
use LWP::UserAgent;
# Fetch a GIF image
my $ua = LWP::UserAgent->new();
my $res = $ua->get('http://example.com/foo-animation.gif');
@mugifly
mugifly / esp-1wire-temp-sensor-with-hassio.ino
Last active March 17, 2019 14:34
ESP8266 + DS18B20 One-Wire Temperature Sensor (Works with Hass.io)
// ESP8266 + DS18B20 One-Wire Temperature Sensor (Works with Hass.io)
// https://gist.github.com/mugifly/8e5a0aa81ca4a2485b2c2b46e0968fc6
#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <timer.h>
@mugifly
mugifly / ghome-notifier-server.js
Last active March 27, 2019 10:07
Simplest API Server for Google Home Notifier
/**
* Simplest API Server for Google Home Notifier
* https://gist.github.com/mugifly/22af0d55ccf4099becd44165f6500196/
* Thanks for https://github.com/noelportugal/google-home-notifier
**/
'use strict';
// Language to speak
@mugifly
mugifly / esp-signal-lights.ino
Created April 26, 2019 02:22
ESP8266 + Triple Signal Lights
// ESP8266 + 積層信号灯 (3色)
// https://gist.github.com/mugifly/
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <timer.h>
// 設定 - Wi-Fi
#define WLAN_SSID "XXXXXX"
@mugifly
mugifly / mag.md
Last active June 3, 2019 14:56
A simplest and unofficial client command for leafee mag (IoT sensor for doors and windows)

mag.py

A simplest and unofficial client command for leafee mag

Installation

It tested on Raspberry Pi Zero W with Raspbian Stretch.

$ sudo apt-get install python-pip libglib2.0-dev bluez-tools
$ sudo pip install bluepy