Skip to content

Instantly share code, notes, and snippets.

@sh4869
sh4869 / Tweet.rb
Last active August 29, 2015 14:00
Gtk2で出来たツイッタークライアント紛いです。ファイルが結構分割されているので使いたければ。
def tweet_dialog
window = Gtk::Window.new
window.title = "Tweet"
window.signal_connect("delete_event") do
Gtk.main_quit
false
end
window.border_width = 20
@sh4869
sh4869 / sh4869.md
Created May 23, 2014 06:52
sh4869bot description

#sh4869bot's description.

##現在の概要

  • ツイ廃アラート
  • Github web service hock
  • IFTTTによる自動投稿

##これから追加したい機能

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
//相手のカードの番号を決めるための関数
int EnRandom(int x[]){ //Enemy's card create
x[0]=rand()%10; //0~9の間の乱数をx[0](一枚目のカード)に代入
x[1]=x[0];
//x[0](一枚目のカード)とx[1](二枚目のカード)が違う数になるまでx[1]に0~9の乱数を代入
while(x[0]==x[1]){
@sh4869
sh4869 / todo.css
Last active August 29, 2015 14:02
Todo List made by dart
body {
font-family: 'Open Sans', sans-serif;
background-color: WhiteSmoke;
margin: 15px;
}
#to-do-input {
font-family: 'Open Sans', sans-serif;
font-size: 14px;
padding: 5px 0px 5px 5px;
@sh4869
sh4869 / kuromoji_test.java
Created June 17, 2014 13:20
日本語解析ライブラリkuromojiのサンプルプログラム
package kuromoji_test;
import java.util.*;
import java.util.Random;
import org.atilika.kuromoji.Token;
import org.atilika.kuromoji.Tokenizer;
public class kuromoji_test {
public static void main(String[] args) {
@sh4869
sh4869 / ame_yame.java
Created June 17, 2014 13:22
雨やめbot made in Java
package ame_yame_java;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import twitter4j.Status;
import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.TwitterFactory;
void main(){
int n = 0;
while(n < 100){
if(n % 15 == 0){
print("FizzBUzz");
}else if(n % 5 == 0){
print("Buzz");
}else if(n % 3 == 0){
print("Fizz");
}else{
@sh4869
sh4869 / .vimrc
Last active August 29, 2015 14:02
My Vimrc
set number
set notitle
set nocompatible
set title
set showmatch
set wildmenu
set showcmd
set noswapfile
set smartindent
set tabstop=4
public class Main
{
public static void main(String[] args)
{
String kokoro = "kokoro";
String pyon = "pyon";
String befo = pyon;
String res = kokoro + pyon;
String res2 = "";
int i = 1;
# Coding: UTF-8
require 'csv'
csv = CSV.table('tweets.csv')
tweets = csv[:text]
tweets.each do |txt|
text = txt.to_s
if text.start_with?("RT","@") == false
file = File.open("tweet.txt","a")