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
wget https://github.com/google/googletest/archive/release-1.7.0.tar.gz | |
tar xf release-1.7.0.tar.gz | |
cd googletest-release-1.7.0 | |
cmake . | |
make | |
cp -a include/gtest ../KENSv3/include | |
cp -a libgtest* ../KENSv3/lib | |
cd .. | |
rm release-1.7.0.tar.gz | |
rm -rf googletest-release-1.7.0/ |
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
upstream django { | |
server unix:///home/(.*)/(.*).sock; | |
} | |
# configuration of the server | |
server { | |
listen 80; | |
listen 443 ssl; | |
server_name (.*); | |
charset utf-8; |
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
[uwsgi] | |
chdir = /home/ubuntu/(.*) | |
module = (.*).wsgi | |
home = /home/ubuntu/env | |
master = true | |
processes = 10 | |
socket = /home/ubuntu/(.*)/(.*).sock |
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/bash | |
# make sure there's ./testresult directory | |
# For individual test: $ bash test.sh testdir/testname | |
# For whole test: $ bash test.sh | |
test_all() { | |
for i in $(seq 1 10) | |
do | |
make clean > testresult/dummy.txt | |
make > testresult/dummy.txt |
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
# for git | |
alias gitpintos="git clone git@github.com:todoaskit/pintos.git" | |
# for pinto settings | |
alias pintosrun="pintos -v --bochs -- -q run" | |
# indivisual test | |
result() { | |
make | |
echo "" |
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
for(var i = 0; i < 10; i ++){ | |
var x = Math.floor((Math.random() * 80) + 1); | |
$("div[data="+x+"]").click(); | |
}; | |
$("#submit").click(); |
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/bash | |
# usage bash toCamel.sh target.js | |
# snake_func -> snakeFunc | |
for i in $(seq 1 30) | |
do | |
cat $1 | sed -r 's/([a-z]+)_([a-z])([a-z]+)/\1\U\2\L\3/g' > temp | |
mv temp $1 | |
done |
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
function moveVote(idx) | |
{ | |
var voted = 'url(//ton.twimg.com/tfw/assets/checkmark_circle_v1_06f15f494d711c69b89c759b68d1fcbbecdca631.svg)'; | |
for(var i = 1; i <= 4; i += 1) | |
$('.PollXChoice-choice--selected[data-poll-index="' + i + '"]').style.backgroundImage = "None"; | |
$('.PollXChoice-choice--selected[data-poll-index="' + idx + '"]').style.backgroundImage = voted; | |
} | |
moveVote(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
import random, sys | |
""" | |
기차에 100명의 승객이 순서대로 탄다. 첫 번째 승객이 티켓을 잃어 버려서 랜덤한 | |
자리에 앉는다. 두 번째 승객부터는 자기 자리가 비어있으면 자기 자리에 앉고, 누가 | |
앉아있으면 랜덤한 자리에 앉는다. 100번째 승객이 자기 자리에 앉을 확률은? | |
""" | |
def run(num): | |
passengers = list(range(1, num+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
xargs -a requirements.txt -n 1 pip3 install |
OlderNewer