Skip to content

Instantly share code, notes, and snippets.

@ryo-n
ryo-n / workflow.yml
Last active December 29, 2023 12:04
その日ACした問題一覧をdiscordに通知するaction
name: discord message
on:
workflow_dispatch:
schedule:
- cron: '15 21 * * *'
jobs:
build:
name: Build
runs-on: ubuntu-latest

Keybase proof

I hereby claim:

  • I am ryo-n on github.
  • I am ryo_n (https://keybase.io/ryo_n) on keybase.
  • I have a public key ASDX_NIGy4YYhgxJlZZzhnl8MUP_6b6o3sPnZADwVU1nygo

To claim this, I am signing this object:

@ryo-n
ryo-n / codeforces_template.rs
Created July 6, 2021 02:17
Codeforces Rustテンプレート
use whiteread as w;
use std::io::Write;
fn run() -> w::reader::Result<()> {
let out = std::io::stdout();
let mut out = std::io::BufWriter::new(out.lock());
let input = std::io::stdin();
let input = input.lock();
let mut input = w::Reader::new(input);
@ryo-n
ryo-n / ContestScheduleWidget.js
Last active July 19, 2021 09:22 — forked from morioprog/ContestScheduleWidget.js
競技プログラミングのコンテスト予定を表示するiOSウィジェット(導入方法:https://blog.morio.dev/2021/01/contest_schedule_widget/
// 初期設定
// 1. CLIST(`https://clist.by/`)にログイン
// 2. `https://clist.by/api/v1/doc/`の上部の「show my api-key」を選択
// 3. 出てきたモーダル下部の「Param query」を下のCLIST_APIに貼り付け
const CLIST_API = "/?username=*****&api_key=****************************************";
// contestIds : 表示するコンテストサイトのリスト (CLISTにおけるコンテストサイトのID)
// > `https://clist.by/api/v1/doc/#!/resource/resource_list/`から検索できる
// * codeforces.com : 1
// * atcoder.jp : 93
@ryo-n
ryo-n / clist.1h.py
Last active August 28, 2021 04:15
xbar clist plugin
#!/usr/bin/env python3
import requests
import datetime
import json
USERNAME = "clist_username"
# コンテストサイトのリソースIDをカンマ区切りで記述
# 各コンテストサイトのリソースIDは下記APIを呼べば一覧を取得することができる
@ryo-n
ryo-n / b.rb
Last active December 12, 2019 12:25 — forked from junegunn/b.rb
b - browse Chrome bookmarks with fzf
#!/usr/bin/env bash
# vim: set filetype=ruby:
# b - browse Chrome bookmarks with fzf
[ $(uname) = Darwin ] || exit 1
which fzf > /dev/null 2>&1 || brew reinstall --HEAD fzf || exit 1
/usr/bin/ruby -x "$0" |
fzf --ansi --multi --no-hscroll --tiebreak=begin |
awk 'BEGIN { FS = "\t" } { print $2 }' |
@ryo-n
ryo-n / c.sh
Last active December 13, 2019 14:46
#!/usr/bin/env bash
# https://github.com/junegunn/fzf/wiki/examples
c() {
local columns cols sep google_history open
columns=$(tput cols)
cols=$(( columns / 3 ))
sep='{::}'
if [ "$(uname)" = "Darwin" ]; then
@ryo-n
ryo-n / hatebu_hot.1h.py
Created March 31, 2017 16:01
bitbar hatebu hotentry plugin
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import io
import feedparser
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
url = 'http://feeds.feedburner.com/hatena/b/hotentry'
rss = feedparser.parse(url)