Skip to content

Instantly share code, notes, and snippets.

View puhitaku's full-sized avatar
:octocat:
= 🐙 + 🐱

Takumi Sueda puhitaku

:octocat:
= 🐙 + 🐱
View GitHub Profile
@puhitaku
puhitaku / agtc.py
Last active May 7, 2017 13:34
Be an AGTC programmer.
#!/usr/bin/env python3.6
import sys
a = 'AGTC'
def encode(s):
out = []
for c in s.encode():
seq = [
@puhitaku
puhitaku / googlescript.css
Last active June 28, 2017 09:15
Google Script
.CodeMirror-scroll.cm-s-default {
background-color: #191919;
font-family: "Source Han Code JP";
font-size: 12px;
}
.CodeMirror-scroll.cm-s-default .CodeMirror-lines pre.CodeMirror-cursor{
border-left: 1px solid rgba(187, 187, 187, 127) !important;
}
@puhitaku
puhitaku / export_pref_emojis.py
Last active December 21, 2016 15:52
Japanese prefecture emoji exporter
# -*- coding: utf-8 -*-
# License: Public Domain
from __future__ import unicode_literals, print_function
import math
import cairosvg
from PIL import Image
from kartograph import Kartograph
@puhitaku
puhitaku / main.py
Created November 5, 2016 17:52
Slack Emoji Counter
#!/usr/bin/env python3
count_all = False # Include aliases in count or not
import fileinput, sys
from collections import OrderedDict
import requests as req
from bs4 import BeautifulSoup

What's this?

This is a re-implemented version of Physical Router Driver for MicroPython. This code is experimental: it might cause some problems.

How to use?

Copy main.py into the root dir of Physical Router Driver ( https://github.com/puhitaku/physical_router_driver ) and execute it. Both CPython and MicroPython can run this.

Tested environment

  • MicroPython 1.4.5
@puhitaku
puhitaku / eq.md
Last active June 29, 2016 15:14
Equation in Markdown

質量はエネルギーと等価

連立方程式

  ――― ①

@puhitaku
puhitaku / driver
Last active May 15, 2016 07:06
Physical Router Driver init script
#!/bin/sh /etc/rc.common
# AUTHOR: Takumi Sueda <[email protected]>
START=92
USE_PROCD=1
PROG=/usr/bin/gunicorn
DAEMON=${PROG}
@puhitaku
puhitaku / supervisor
Last active December 29, 2024 16:00
Supervisor init script for OpenWrt (procd).
#!/bin/sh /etc/rc.common
#
# AUTHOR: Takumi Sueda <[email protected]>
#
# Start/stop/restart supervisor in OpenWrt.
START=91
USE_PROCD=0
PROG=/usr/bin/supervisord
Section "InputClass"
Identifier "touchpad catchall"
Driver "synaptics"
MatchIsTouchpad "on"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
MatchDevicePath "/dev/input/event*"
Option "VertScrollDelta" "-190"
Option "HorizScrollDelta" "-190"
@puhitaku
puhitaku / weblio.css
Created March 16, 2016 08:04
Weblio without JS
#summary {
position: static;
padding: 15px 2px 15px 2px;
}
.summaryTbl {
display: none;
padding-top: 15px;
}