- その面白そうな話、私も参加していいよね?なぜなら私は無条件に受け入れられているからおじさん(闖入おじさん) #おじさんパターン
- 後出し難癖おじさん #おじさんパターン
- 困難は成長のチャンス!だから君たちに成長の機会をあげようおじさん (成長おじさん) #おじさんパターン
- あらゆる事案に一般論コメントおじさん #おじさんパターン
- 俺ってあらゆることに精通してるじゃん?だから力になるよおじさん (精通おじさん) #おじさんパターン
This file contains hidden or 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/bash -ex | |
| exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1 | |
| while [ ! -e /dev/sdb ]; do echo Waiting for Ephemeral Disk to attach; sleep 5; done | |
| if ! `df | grep -q /media/ephemeral0` ; then | |
| mkfs.ext3 /dev/sdb | |
| mount -t ext3 /dev/sdb /media/ephemeral0 | |
| fi | |
| # snip... |
This file contains hidden or 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/bash | |
| # BSD sed | |
| for keg in /usr/local/Library/LinkedKegs/*; do kegname="$(basename $keg)"; dir="$(find $keg/ -maxdepth 1 -type d | grep '\/\(sbin\|bin\|etc\|var\|lib\|include\|libexec\|share\)$' | head -n1)"; [ -z "${dir}" ] && continue; testee="$(find $dir -type f | head -n1 | sed -e "s|${keg}||")"; test -f /usr/local/$testee || (echo $keg && brew unlink $kegname; brew link --force $kegname); done |
This file contains hidden or 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
| import AVFoundation | |
| import Foundation | |
| // The maximum number of audio buffers in flight. Setting to two allows one | |
| // buffer to be played while the next is being written. | |
| private let kInFlightAudioBuffers: Int = 2 | |
| // The number of audio samples per buffer. A lower value reduces latency for | |
| // changes but requires more processing but increases the risk of being unable | |
| // to fill the buffers in time. A setting of 1024 represents about 23ms of |
This file contains hidden or 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/perl -l | |
| use strict; | |
| use warnings; | |
| $ENV{LANG} = "C"; | |
| $ENV{PATH} ||= "/usr/local/bin:/usr/bin/:/bin"; | |
| my $eth = shift || "eth0"; | |
| `ip addr list dev $eth|grep 'inet '` =~ m{\.(\d+?)\.(\d+?)\/}; |
This file contains hidden or 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
| # rubocop v0.35.0 から inherit_gem という機能が増えたので gem にしました | |
| # https://github.com/onk/onkcop | |
| inherit_gem: | |
| onkcop: "config/rubocop.yml" |
This file contains hidden or 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
| console.log('Loading function'); | |
| const https = require('https'); | |
| const url = require('url'); | |
| // to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration | |
| const slack_url = 'https://hooks.slack.com/services/...'; | |
| const slack_req_opts = url.parse(slack_url); | |
| slack_req_opts.method = 'POST'; | |
| slack_req_opts.headers = {'Content-Type': 'application/json'}; |
This script is no longer required with Docker for Mac which includes an option to run Docker at startup and doesn't use docker-machine to administer the local Docker engine.
- Docker Machine + Docker
- curl
- A Virtualbox-driven Docker Machine called "default"
docker-machine create --driver virtualbox default(this is the default with Docker toolkit).