Skip to content

Instantly share code, notes, and snippets.

Haru Akebono haru-ake

Block or report user

Report or block haru-ake

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@haru-ake
haru-ake / textfsm-parser.py
Created Jun 18, 2019
TextFSM quick parser
View textfsm-parser.py
#!/usr/bin/env python
#
# $1 ... TextFSM template file
# $2 ... Raw text file
#
# https://github.com/google/textfsm/wiki/TextFSM
import pprint
@haru-ake
haru-ake / tmux.conf
Last active Feb 11, 2019
Call `pet search` command via tmux.
View tmux.conf
bind C-f run-shell 'tmux split-window tmux\ send-keys\ \-t\ #{pane_id}\ \"\$\(pet\ search\)\"'
@haru-ake
haru-ake / apns.sh
Last active Nov 29, 2018
Send APNs notification
View apns.sh
#!/usr/bin/env bash
ENDPOINT_URL='https://api.push.apple.com/3/device' # PROD
# ENDPOINT_URL='https://api.development.push.apple.com/3/device' # DEV
# If you want send VoIP push, you should add '.voip' to the end.
BUNDLE_IDENTIFIER="REPLACE BUNDLE IDENTIFIER YOUR APP"
CLIENT_CERT_PATH='REPLACE YOUR CERT PATH'
CLIENT_TOKEN='REPLACE YOUR CLIENT TOKEN'
View fcm-send-notification.sh
#!/usr/bin/env bash
SERVER_KEY='REPLACE YOUR SERVER KEY'
DEVICE_TOKEN='REPLACE YOUR CLIENT TOKEN'
PAYLOAD="{\"to\": \"$DEVICE_TOKEN\", \"data\":{\"test\":\"test\"}"
curl -v -H "Authorization: key=$SERVER_KEY" -H "Content-Type: application/json" -d "$PAYLOAD" -XPOST https://fcm.googleapis.com/fcm/send
@haru-ake
haru-ake / use-ak-020-on-raspbian-stretch.md
Last active Jul 16, 2018
Use AK-020 on Raspbian stretch
View use-ak-020-on-raspbian-stretch.md

Use AK-020 on Raspbian stretch

Install required packages

# apt-get install wvdial usb-modeswitch

Dialer settings

/etc/wvdial.confこんな感じ にする。

@haru-ake
haru-ake / wvdial.conf
Last active Jul 16, 2018
wvdial.conf for AK-020 + Rocket Mobile SIM
View wvdial.conf
[Dialer Defaults]
Init1 = AT+CFUN=1
Init2 = ATZ
Init3 = AT+CGDCONT=1,"IP","4gn.jp"
Dial Attempts = 15
Stupid Mode = yes
Modem Type = Analog Modem
Dial Command = ATD
Baud = 460800
New PPPD = yes
@haru-ake
haru-ake / dhcpcd.conf.md
Last active Jul 8, 2018
Ignore routes and nameserver recived via DHCP on Raspbian Stretch
View dhcpcd.conf.md

Add to /etc/dhcpcd.conf

interface eth0
static routers=
static domain_name_servers=
static domain_search=
@haru-ake
haru-ake / seiyu_5percent_off.ics
Last active Aug 17, 2019
An ics file of 西友 5% off calendar
View seiyu_5percent_off.ics
BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VEVENT
SUMMARY:西友 5% OFF 開催日
DTSTART;VALUE=DATE:20190803
END:VEVENT
BEGIN:VEVENT
SUMMARY:西友 5% OFF 開催日
DTSTART;VALUE=DATE:20190817
END:VEVENT
@haru-ake
haru-ake / issue.md
Created Jun 28, 2018
Dart2 compatibility
View issue.md
@haru-ake
haru-ake / tmux.conf
Created Jun 27, 2018
Cursor to always newest buffer with tmux choose-buffer
View tmux.conf
bind ] if 'test -n "$(tmux list-buffer)"' \
"choose-buffer -F \"#{buffer_size} bytes: #{=60:buffer_sample}\" -O name \; send-keys Up" \
"display-message 'Buffer is empty'"
You can’t perform that action at this time.