Skip to content

Instantly share code, notes, and snippets.

@atpons
atpons / thelper
Last active November 11, 2019 08:16
thelper
#!/bin/bash
############################################################
# thelper
# ----------------------------------------------------------
# Keep exist route specified host.
# ----------------------------------------------------------
# + Usage
# $ thelper google.com (Add/Delete)
# + Install
MagicNumber = 0xa1b2c3d4
VersionMajor = 0x2
VersionMinor = 0x4
ThisZone = 0x0
SigFigs = 0x0
SnapLen = 0x7d0
Network = 0x1
Num: 0
TsSec = 0x59d22b14
TsSec (Format) = 2017-10-02T21:03:32+09:00
language=[mips]Assembler
##########################################
# kemuideとレポート用紙を行き来するスニペット
# レポート用紙から貼り付けるとkemu-ideに貼り付けられるし
# kemu-ide から貼り付けるとレポート用紙にペーストできるやつ(命令非対応ですが)
# TODO: 命令に対応する
##########################################
STDERR.puts "[*] Waiting your snippet"
input = $stdin.read.split("\n")
##########################################
# kemuideとレポート用紙を行き来するスニペット
# レポート用紙から貼り付けるとkemu-ideに貼り付けられるし
# kemu-ide から貼り付けるとレポート用紙にペーストできるやつ(命令非対応ですが)
# TODO: 命令に対応する
##########################################
STDERR.puts "[*] Waiting your snippet"
input = $stdin.read.split("\n")
#!/bin/bash
# Discord へ指定フォルダ内のemojiをupload
# @atpons / MIT License
TOKEN=TOKEN_OF_BOT
DIR=DIRECTORY
ID=SERVER_ID
for file in `\find $DIR -maxdepth 1 -type f`; do
@atpons
atpons / autoconfig.sh
Last active January 27, 2018 02:40
Raspberry Pi の IP アドレス固定化 + ssh 自動接続
#!/bin/bash
# Usage: ./autoconfig.sh IP_ADDRESS DEFAULT_GATEWAY
echo "[*] fix ip addr"
sudo cat <<EOF >> /etc/dhcpcd.conf
interface eth0
static ip_address=$1
static routers=$2
static domain_name_servers=$2
@atpons
atpons / a.rb
Created January 22, 2018 01:07
dropbox.com/sh/wtl7cdd00g66qk0/AAA16mJDxMaCSWdcqFZ495SMa?dl=0
@atpons
atpons / detect.png
Last active November 30, 2017 22:49
advent2017_01
detect.png
#include <stdio.h>
int findCombi(int toHour) {
int aHour = 300; // 300 Hours
int aPrice = 100; // 100 JPY
int bHour = 500; // 500 Hours
int bPrice = 180; // 180 JPY
int aNum = toHour / aHour;
int bNum = toHour / bHour;