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/zsh | |
cd ~/.nyan/vim | |
git=`git pull` | |
echo $git | |
if [[ "Already up to date." != $git ]]; then | |
old_vim=`vim --version | head -n 2` | |
make clean | |
./configure --prefix=/usr/local --with-luajit --enable-channel --enable-cscope --enable-fontset --enable-gpm --enable-icon-cache-update --enable-largefile --enable-multibyte --enable-netbeans --enable-nls --enable-option-checking --enable-terminal --enable-xim --enable-python3interp=yes --enable-pythoninterp=yes --enable-rubyinterp=yes --enable-luainterp=yes && make -j8 && sudo make install | |
new_vim=`vim --version | head -n 2` | |
else |
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/sh | |
servers_dir="/disk/sdb2/Game/minecraft/Server" | |
server_profile=`ls $servers_dir | peco` | |
[[ -z $server_profile ]] && exit 1 | |
echo "START $server_profile" | |
cd $servers_dir/"$server_profile" | |
sh -c '`cat start.bat | grep java | nkf -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
# -*- coding: utf-8 -*- | |
Plugin.create(:ripo) do | |
time = 3600 | |
def next_hour(time) | |
Reserver.new(time) { | |
activity :system, "リポを交換してください" | |
next_hour(time) |
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
#include <ArduinoSTL.h> | |
#include <SPI.h> | |
#include <Servo.h> | |
#include <bitset> | |
#include <iostream> | |
#include <iterator> | |
#include <stdlib.h> | |
#include <vector> | |
byte data_head = 0x00; |
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
Fifteen = ->(x){x%15 == 0} | |
Five = ->(x){x%5 == 0} | |
Three = ->(x){x%3 == 0} | |
1.step(100) do |count| | |
puts case count | |
when Fifteen then | |
"FizzBuzz" | |
when Five then | |
"Buzz" | |
when Three then |
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
class Hoge | |
def fuga(var) | |
if var%15 == 0 then | |
return 15 | |
elsif var%5 == 0 then | |
return 5 | |
elsif var%3 == 0 then | |
return 3 | |
else | |
return var |
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
puts "値を入力してください" | |
val = gets.to_i | |
for num in 1..val do | |
if num%15 == 0 then | |
puts "FizzBuzz" | |
elsif num%5 == 0 then | |
puts "Buzz" | |
elsif num%3 == 0 then | |
puts "Fizz" | |
else |
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
#include <stdio.h> | |
#include <string.h> | |
//換算率 | |
const int rate = 120; | |
int main() { | |
char str[50]; | |
printf("データを入力してください:"); | |
// 入力読みこみ |
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
#include <iostream> | |
#include <string> | |
int main() { | |
std::cout << "N = "; | |
int var; | |
std::cin >> var; | |
for (int i = 1; i <= var; i++) | |
std::cout << i << (i % 3 == 0 || std::to_string(i).find("3") != std::string::npos ? "アホ" : "") << std::endl; | |
} |
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
let var=input('N=') | |
echo "\n" | |
for i in range(1, var) | |
let flag=((i%3==0)||(matchstr(i,3)!='')) | |
if flag | |
echo i . 'アホ' | |
else | |
echo i | |
endif | |
endfor |
NewerOlder