Skip to content

Instantly share code, notes, and snippets.

View sgk's full-sized avatar

Shigeru KANEMOTO sgk

  • Switch Science /144Lab
  • Tokyo / Osaka
View GitHub Profile
@sgk
sgk / gist:5788552
Last active December 18, 2015 13:18
Ubuntuをインストールしたら行う設定
% sudo apt-get install aptitude
% sudo apt-get install virtualbox-guest-utils
% sudo apt-get purge unity-lens-music unity-lens-photos unity-lens-video
% sudo apt-get purge unity-scope-gdrive unity-scope-musicstores unity-scope-video-remote
% sudo apt-get purge unity-webapps-common
% sudo apt-get purge xul-ext-ubufox xul-ext-unity xul-ext-webaccounts xul-ext-websites-integration
% sudo apt-get purge ubuntuone-client python-ubuntuone-client python-ubuntuone-storageprotocol
% sudo vi /etc/default/ntpdate
% sudo apt-get install ntp
% sudo vi /etc/ntp.conf
@sgk
sgk / README.md
Last active April 8, 2016 14:30
Gnome端末の日本語表示で「↑」とか「◯」の幅を全角にする(Ubuntu 14.10用)。

Ubuntu 15.04では、プロファイル設定の「互換性」タブで設定できるので不要。この方法は機能しない。

  • このファイルを、~/.local/share/applications以下に、○○.desktopなどという名前で置き、実行権限をつける。
  • Nautilus(ファイルブラウザ)から、このファイルを開く。
  • 端末が開いてランチャにアイコンが現れるので、アイコンを右クリック→「Launcherに登録」をクリック。

vimではまた別の問題があるので、.vimrcの中で「set ambiwidth=double」も必要。

@sgk
sgk / EAGLE.SCR
Last active December 20, 2015 12:18
EAGLE.SCR
# Configuration Script
#
# This file can be used to configure the editor windows.
# GENERAL:
# Switch Science
ASSIGN C+0 WINDOW FIT;
ASSIGN F7 MOVE;
ASSIGN F8 ROUTE;
@sgk
sgk / patch.ino
Last active April 9, 2017 20:36
Patch Arduino Yun to disable WiFi
#include <Process.h>
void setup() {
Bridge.begin();
Serial.begin(9600);
while (!Serial)
;
Serial.println("Invoking patch script on Yun.");
@sgk
sgk / delcom.bat
Created September 18, 2013 12:06
# execute this script as an administrator.
set devmgr_show_nonpresent_devices=1
start devmgmt.msc
@sgk
sgk / PatchYun.ino
Created September 20, 2013 17:50
Patch Yun to disable WiFi function.
#include <Process.h>
void setup() {
Bridge.begin();
Serial.begin(9600);
while (!Serial)
;
Serial.print("Patching...");
% sudo apt-get install golang
% sudo apt-get install vim-syntax-go
% vim-addon-manager install go-syntax
@sgk
sgk / baseball.ino
Last active December 25, 2015 21:49
Arduino "baseball" game
#define BUTTON 2
#define SPEAKER 3
#define BALL5 9
#define BALL4 10
#define BALL3 11
#define BALL2 12
#define BALL1 13
#define DURATION 500000
unsigned long duration = DURATION;
@sgk
sgk / reset.ino
Created December 7, 2013 16:32
Reset Arduino after flashing 100 times. The bootloader will not work. Arduinoで、100回点滅した後にリセットする。ブートローダは動きません。
#include <avr/wdt.h>
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
for (int i = 0; i < 100; i++) {
digitalWrite(13, HIGH);
delay(30);
@sgk
sgk / gist:8883849
Created February 8, 2014 13:38
Intel Rapid Storage TechnologyのRAID1でディスク容量を増やす

Intel Rapid Storage TechnologyのRAID1でディスク容量を増やす

  1. 電源オフにし、ドライブを1台外して、大きな容量のドライブを装着する。
  2. 電源オンにし、起動完了後、管理アプリを起動し、今装着したドライブを「スペア」として指定する。
  3. リビルドが行われるので、完了するまで待つ。
  4. 電源オフにし、もう1台のドライブも外して、大きな容量のドライブを装着する。