Skip to content

Instantly share code, notes, and snippets.

View konishi's full-sized avatar
🏠
Working from home

Tomoya Konishi konishi

🏠
Working from home
View GitHub Profile
public class FizzBuzz {
public static void main(String[] args) {
for (int i=1; i>100; i++) {
if ((i%3 == 0) && (i%5 == 0)) {
System.out.println("FizzBuzz" + ",");
} else if (i%3 == 0) {
System.out.println("Fizz" + ",");
} else if (i%5 == 0) {
System.out.println("Buzz" + ",");
} else {
import java.io.*;
import java.util.*;
public class FizzBuzz {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("カウント上限を入力して下さい。");
@konishi
konishi / test.html.erb
Created August 3, 2011 08:06
ちょっと試しに投稿
<% rank = 1 %>
<% count_target.good_users.each do |user| %>
<% if rank >= 11 %>
<% break %>
<% end %>
<div class="good-ranking-box">
<% if rank > 3 %>
<div class="ranking-other">
<% else %>
<div class="ranking-<%= rank %>">
@konishi
konishi / test.rb
Created August 8, 2011 16:35
またまた試しに投稿してみるテスト。ローカルだとgithubアカウントで投稿したらコードがGistに投稿されない。
def f
put "hello"
end
@konishi
konishi / file0.html
Created November 4, 2011 17:22
blockquoteでpタグを囲ってblockquoteのpadding-bottom:0px; にするとpタグのmargin-bottomがはみ出す ref: http://qiita.com/items/866
<blockquote>
<p>
</p>
</blockquote>
@konishi
konishi / file0.css
Created November 7, 2011 04:54
CSSで透過グラデーションを細かく指定する方法 ref: http://qiita.com/items/909
gradient {
background: -moz-linear-gradient(top,
rgba(255,255,255,0),
rgba(255,255,255,0.8) 30%,
rgba(255,255,255,1));
background: -webkit-gradient(linear, left top, left bottom,
from(rgba(255,255,255,0)),
color-stop(0.3, rgba(255,255,255,0.8)),
to(rgba(255,255,255,1)));
background: -o-linear-gradient(top,
@konishi
konishi / file0.txt
Created November 13, 2012 05:27
herokuにデプロイする方法 ref: http://qiita.com/items/e4e90888906b6323aead
git init -q && git commit -q --allow-empty -m 'Initialize repository'
git init
git add -A
git commit
@konishi
konishi / file0.js
Created November 13, 2012 13:01
URLのタイトルを取得するスクリプト ref: http://qiita.com/items/45c852e2af3d6d8b0736
var checkUrl = "取得したいURL";
function getTitle(url,callback){
var xhr=new XMLHttpRequest()
xhr.onload = function() {
var title=this.responseXML.title||"no title"
callback(url,title)
}
xhr.open("GET", url ,true);
xhr.responseType="document";
.sandbox-StripeBackground {
width: 100%;
height: 100%;
display: grid;
grid: repeat(5, 1fr) / repeat(10, 1fr);
transform: skewY(-12deg);
transform-origin: 0;
background: linear-gradient(150deg, #1bcde4 15%, #0fedbf 70%, #c0ffa6 94%);
span {
&:nth-child(1) {
.sandbox-HoverCard {
align-items: center;
box-sizing: border-box;
display: flex;
justify-content: center;
padding: 30px;
&_Item {
align-items: center;
background-color: #fff;