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
lsof -i:3000 | tail -1 | awk '{ print $2 }' | xargs kill |
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
git gr -E 'sub .+\{' Hoge.pm | cut -d':' -f 2 | awk '{ print $2 }' |
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
hub pull-request -i `git rev-parse --abbrev-ref HEAD | sed -e "s/^[^0-9]*\([0-9]*\).*$/\1/"` -b staging/master | xargs open |
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
git rev-parse --abbrev-ref HEAD | sed -e "s/^[^0-9]*\([0-9]*\).*$/\1/" |
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
sed -e "s/^[^0-9]*\([0-9]*\).*$/\1/" |
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
<?xml version="1.0"?> | |
<root> | |
<list> | |
<item> | |
<name>Private</name> | |
<item> | |
<name>Command_R to Return</name> | |
<identifier>remap.CommandR2return</identifier> | |
<autogen>--KeyToKey-- KeyCode::COMMAND_R, KeyCode::RETURN</autogen> | |
</item> |
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
# encoding: UTF-8 | |
class Pikachu | |
# インスタンス変数へのアクセサ | |
attr_accessor :hp, :attack, :defence | |
def initialize(hp, attack, defence) | |
# インスタンス変数に代入する | |
@hp = hp | |
@attack = attack | |
@defence = defence |
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
# Mac only | |
voices = %w{Alex Deranged Victoria Zarvox Fred Ralph Agnes Vicki Albert} | |
(1..10000).each do |i| | |
current_voice = voices[i%(voices.size)] | |
str = '' | |
str = 'Fizz' if i % 3 == 0 | |
str << 'Buzz' if i % 5 == 0 | |
puts current_voice + ": " + (str.empty? ? i : str).to_s | |
`say -v #{current_voice} #{str.empty? ? i : str}` | |
end |
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
WIDTH=16; | |
DEPTH=256; | |
ADDRESS_RADIX=HEX; | |
DATA_RADIX=BIN; | |
CONTENT BEGIN | |
000 : 1000000011111111; | |
001 : 1000000111111111; | |
002 : 1100100000010000; |
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
module RegisterFile (Read1, Read2, Write, RegWrite, WriteData, Data1, Data2); | |
input [2:0] Read1, Read2, Write; | |
input [15:0] WriteData; | |
input RegWrite; | |
output [15:0] Data1, Data2; | |
reg [15:0] RegFile [0:7]; | |
assign Data1 = RegFile[Read1]; | |
assign Data2 = RegFile[Read2]; | |