This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created by newuser for 4.3.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.CodeMirror { font-size: 20px !important; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*- coding: utf-8 -*- | |
gugigi = Enumerator.new do |g| | |
number = 1 | |
loop do | |
ggg = number % 15 == 0 ? "おどりゃクソ森" : | |
number % 5 == 0 ? "グギギッ" : | |
number % 3 == 0 ? "ギギギ" : | |
number % 2 == 0 ? "くやしいのう" : "ギ" | |
number += 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
##(snip) | |
# Appends a value to an array. | |
# | |
# @param [String] $1 Name of the variable to modify | |
# @param [String] $2 Value to append | |
function append() { | |
eval $1[\${#$1[*]}]=$2 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
wget http://ftp.apnic.net/stats/apnic/delegated-apnic-latest -O - | | |
grep ipv4 | | |
grep 'apnic|JP' | | |
awk -F'|' '{print $4"/"$5}' | | |
sed -e 's@4294967296@0@g' | | |
sed -e 's@2147483648@1@g' | | |
sed -e 's@1073741824@2@g' | | |
sed -e 's@536870912@3@g' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# swap 増やす(100MB -> 1024MB) | |
sudo sed -i_origin 's/CONF_SWAPSIZE=100/CONF_SWAPSIZE=1024/' /etc/dphys-swapfile | |
sudo service dphys-swapfile stop && sudo service dphys-swapfile start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# すでに raspi-config を終わらせたものとする | |
# 再起動重要(expand-rootfs の変更を反映/反映しないとswap変更もできないので) | |
reboot | |
# user作成 と ユーザ pi の sudo 無効化 | |
myuser="username" | |
sudo groupadd -g 500 ${myuser} | |
sudo useradd -u 500 -o -g 500 -m ${myuser} | |
rm ~${myuser}/pistore.desktop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# すでに Raspberry Pi がインストールされているSDカードなので | |
# /Volumes/Untitled と変名されている、という前提があります。 | |
write_target=`df -h | | |
grep 'Untitled$' | | |
awk -F' ' '{print $1}' | | |
sed -e 's/[a-z][0-9]$//g' -e 's/disk/rdisk/g'` | |
diskutil unmount `df -h | | |
grep 'Untitled$' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auto lo | |
iface lo inet loopback | |
auto eth0 | |
iface eth0 inet static | |
address 192.168.1.88 | |
netmask 255.255.255.0 | |
gateway 192.168.1.1 | |
allow-hotplug wlan0 | |
iface wlan0 inet manual |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##Raspberry Pi(SD Class10) | |
time dd if=/dev/zero of=/tmp/1024M bs=1024 count=1048576 | |
1048576+0 records in | |
1048576+0 records out | |
1073741824 bytes (1.1 GB) copied, 57.3186 s, 18.7 MB/s | |
dd if=/dev/zero of=/tmp/1024M bs=1024 count=1048576 1.74s user 26.69s system 49% cpu 57.843 total | |
##MacBook Pro(SSD) | |
time dd if=/dev/zero of=/tmp/1024M bs=1024 count=1048576 | |
1048576+0 records in |