Skip to content

Instantly share code, notes, and snippets.

Avatar
😇

utagawa kiki utgwkk

😇
View GitHub Profile
View policies.json
{
"took" : 26,
"_shards" : {
"successful" : 3,
"total" : 3,
"failed" : 0
},
"timed_out" : false,
"hits" : {
"total" : 330,
View gengo.txt
令和
平成
昭和
大正
明治
慶応
元治
文久
万延
安政
@utgwkk
utgwkk / keybindings.json
Created May 5, 2020
VS Code keybindings
View keybindings.json
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "ctrl+q",
"command": "-workbench.action.quickOpenView"
}
]
View style.css
.Chromeで見ると3行で折り返される {
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
display: -webkit-box;
overflow: hidden;
text-overflow: -o-ellipsis-lastline;
word-wrap: break-word;
}
@utgwkk
utgwkk / detect_useless_if.py
Last active Nov 8, 2019
boolをそのまま返せばいいのを検出するやつ
View detect_useless_if.py
import sys
import ast
class TrueFalseDetected(Exception):
def __init__(self, lineno, col):
self.lineno = lineno
self.col = col
def __str__(self):
return 'Useless `if` detected at line {}, column {}'.format(self.lineno, self.col)
View gitignore-webapp.pl
#!/usr/bin/perl
use strict;
use warnings;
=begin comment
各言語実装のディレクトリが置いてあるディレクトリ (ISUCON8予選なら torb/webapp/)にこのスクリプトを置いて実行すると、各言語実装のディレクトリに.gitignoreが配置される
=end comment
=cut
sub get_gitignore {
View twitter-archive-viewer.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>Twitter Archive Viewer</title>
<script>window.YTD = { tweet: {}, account: {} }</script>
<script src="tweet.js"></script><!-- this is loading a file from the archive -->
<script src="account.js"></script><!-- this is loading a file from the archive -->
<style>
.tweet { border: 1px solid #eee; margin: 8px }
.full_text { padding: 8px }
.created_at { padding: 8px; color: #777 }
@utgwkk
utgwkk / 良さみ.py
Created Feb 28, 2019
ありえん良さみが深い
View 良さみ.py
def 優勝():
print("二郎からのセイク")
class 良さみがある:
ありえん = 10
def __init__(self, depth):
self.depth = depth
def ありえん良さみが深い(self):
@utgwkk
utgwkk / nippo.py
Last active Jan 14, 2019
日報を書くように促してくれるSlack incoming webhook氏
View nippo.py
#!/usr/bin/python3
import subprocess
import json
import urllib.parse
from datetime import date
PROJECT_NAME = 'your-project-name'
WEBHOOK_URL = 'SLACK_INCOMING_WEBHOOK_URL'
def to_ja_week(week_num: int) -> str:
View relationship.py
#!/usr/bin/env python3
import itertools
import sys
users = [x.rstrip() for x in sys.stdin.readlines()]
result = "(" + " OR ".join(map(lambda x: "from:" + x, users)) + " exclude:replies) OR "
pairs = []
You can’t perform that action at this time.