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
# Save this file to ~/.config/fish/functions/push-line.fish | |
# Bind the function by using this in ~/.config/fish/functions/fish_user_key_bindings.fish | |
# function fish_user_key_bindings | |
# # For example alt+q | |
# bind \eq push-line | |
# end | |
function push-line | |
set cl (commandline) |
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
require 'tweetstream' | |
TweetStream.configure do |config| | |
config.consumer_key = '' | |
config.consumer_secret = '' | |
config.oauth_token = '' | |
config.oauth_token_secret = '' | |
config.auth_method = :oauth | |
end |
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
require 'tweetstream' | |
require 'sqlite3' | |
db = SQLite3::Database.new('data.db') | |
TweetStream.configure do |config| | |
config.consumer_key = '' | |
config.consumer_secret = '' | |
config.oauth_token = '' | |
config.oauth_token_secret = '' |
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
#!/usr/bin/env python3 | |
from bs4 import BeautifulSoup | |
import os | |
import re | |
import requests | |
import time | |
def get_multi(): | |
# r = requests.get('http://gbf-wiki.com/index.php?コメント/通常マルチバトル救援募集板') |
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 sys | |
if len(sys.argv) < 2: | |
print('Usage:\n$ python Lights.py 6575') | |
sys.exit(0) | |
answer = int(sys.argv[1]) | |
print(answer) | |
dp = [-1] * 10000 | |
a = [] |
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
#!/usr/bin/env ruby | |
S = 20 | |
N = 5 | |
# 初期状態 | |
field = Array.new(S) { Array.new(S, false) } | |
field[5][8] = true | |
field[5][9] = true | |
field[5][10] = true |
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
#include<queue> | |
#include<cstdio> | |
#include<windows.h> | |
using namespace std; | |
HWND findWindow(const char* name) { | |
queue<HWND> que; | |
que.push(GetDesktopWindow()); |