Skip to content

Instantly share code, notes, and snippets.

View dynamis's full-sized avatar
れっさーぱんだもふもふ

dynamis dynamis

れっさーぱんだもふもふ
View GitHub Profile
@dynamis
dynamis / note.md
Last active February 19, 2019 02:17
準備メモ
@dynamis
dynamis / launchapp.jp
Created August 18, 2015 09:06
Firefox OS で特定のアプリを起動する
// launch FM App
navigator.mozApps.mgmt.getAll().onsuccess = function() {
const appId = "app://fm.gaiamobile.org/manifest.webapp";
var urls = [];
var apps = [];
var targetApp = null;
this.result.forEach(function(app) {
urls.push(app.manifestURL);
apps.push(app);
if (app.manifestURL==appId) {
@dynamis
dynamis / console
Last active May 16, 2017 08:30
dragonboard テストビルドの起動時ログ
Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset), D - Delta, S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.BF.3.0-00261
S - IMAGE_VARIANT_STRING=HAAAANAAA
S - OEM_IMAGE_VERSION_STRING=C-BPATTH
S - Boot Config, 0x000002e1
S - Core 0 Frequency, 0 MHz
B - 1547 - PBL, Start
B - 3493 - bootable_media_detect_entry, Start
B - 176861 - bootable_media_detect_success, Start
@dynamis
dynamis / gist:0a471119b5526164cf618be6df710a1a
Last active August 23, 2016 09:41
人感センサー利用サンプル for CHIRIMEN
document.addEventListener('DOMContentLoaded', function () {
let{ spawn, sleep } = task;
spawn(function () {
const gpio = yieldnavigator.requestGPIOAccess();
const sensor = gpio.ports.get(196); // Motion Sensor Data Pin: CN1 7
const led = gpio.ports.get(198); // LED Anode Pin: CN1 9
yield sensor.export('in');
yield led.export('out');
while (true) {
sensor.onchange = v => {
@dynamis
dynamis / useragent-overrider.pref
Created February 24, 2016 07:05
User Agent Overrider の設定
# pref for useragent overrider https://addons.mozilla.org/ja/firefox/addon/user-agent-overrider/
# Linux
Linux / Firefox 45: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Linux / Chrome 34: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36
# Mac
Mac / Firefox 45: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0) Gecko/20100101 Firefox/45.0
Mac / Firefox 38: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Firefox/38.0
Mac / Chrome 34: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36
@dynamis
dynamis / .env
Created November 4, 2013 04:08
Appmaker をローカルで動かすための設定とか
# appmaker-components/.env
PORT=4000
ASSET_HOST=//localhost:4000
DISABLE_CACHE=anythingnotnull
@dynamis
dynamis / .userconfig
Last active December 26, 2015 17:59
Firefox OS ビルド用のユーザ設定ファイル
# See: https://developer.mozilla.org/en-US/Firefox_OS/Customization_with_the_.userconfig_file
#### Build Environment
export CC=gcc-4.6
export CXX=g++-4.6
#export B2G_DIR=${B2G_DIR:-$(cd $(dirname $0); pwd)}
#export GECKO_PATH=${GECKO_PATH:-$(cd gecko; pwd)}
#export GAIA_PATH=${GAIA_PATH:-$(cd gaia; pwd)}
#export GECKO_OBJDIR=${GECKO_PATH}/objdir-gonk
@dynamis
dynamis / upgrade-wordpress.sh
Last active December 20, 2015 05:19
WordPress バージョンアップ用スクリプト (Apache に書き込み権限を与えず使ってる場合用)
#!/bin/sh
PATH=$PATH:/usr/local/sbin:/usr/local/bin
DOCROOT=data
WPFILES=wordpress
cp -R $DOCROOT $DOCROOT-backup-`date +"%Y%m%d"`
# admin files
rm -rf $DOCROOT/wp-admin
@dynamis
dynamis / gist:5212485
Created March 21, 2013 11:52
HTML/CSS/JS 編集時にライブリロードさせるための基本的な Grunt スクリプトの例
"use strict";
var hostname = "localhost";
var port = 8000;
// File Path
var webroot = ".";
var htmlFiles = ["**/*.html", "**/*.md", "!_site/**/*.html"];
var jsFiles = ["**/*.js", "!**/*.min.js"]
var jshintFiles = jsFiles;
@dynamis
dynamis / gist:5028469
Last active December 14, 2015 04:29
ある日 Flickr から同僚に届いたメール

Dear ****'s,

I’m writing to let you know about a recent issue with Flickr’s privacy settings that impacted some of the photos in your account.

While performing routine site maintenance, we identified a software bug that may have changed the view setting on some of your photos from non-public (i.e., private or viewable only by family and friends) to public. Affected photos were visible on Flickr between January 18th and February 7th, 2013. The affected photos were barred from appearing in any search results and they were limited to photos you've uploaded between April and December of 2012. Overall, this issue impacted only a small percentage of photos.

Protecting your privacy is one of our highest priorities so, when we discovered the bug, we took the added precaution of setting any potentially impacted photos in your account to "private.” When a photo is set to “private,” links and embeds on other websites will no longer work. This means you may have photos you intended to share with others that you may ne