Skip to content

Instantly share code, notes, and snippets.

@turanegaku
turanegaku / push-line.fish
Last active August 7, 2021 06:01 — forked from dedeibel/push-line.fish
fish shell function to emulate zsh's push-line feature := store the current command and run one in between - restore the last command afterwards
# 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)
require 'tweetstream'
TweetStream.configure do |config|
config.consumer_key = ''
config.consumer_secret = ''
config.oauth_token = ''
config.oauth_token_secret = ''
config.auth_method = :oauth
end
@turanegaku
turanegaku / TDgrasp.rb
Created April 19, 2017 12:10
ついけし把握
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 = ''
@turanegaku
turanegaku / grande.py
Created March 2, 2017 12:04
グランデ警察
#!/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?コメント/通常マルチバトル救援募集板')
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 = []
#!/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
@turanegaku
turanegaku / foreground.cpp
Created July 18, 2016 04:52
foreground window script.
#include<queue>
#include<cstdio>
#include<windows.h>
using namespace std;
HWND findWindow(const char* name) {
queue<HWND> que;
que.push(GetDesktopWindow());