Skip to content

Instantly share code, notes, and snippets.

@asid21
asid21 / session_adapter.py
Last active December 27, 2022 02:27
micropython cookie
'''
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
@asid21
asid21 / connect2wifi.sh
Last active October 24, 2020 11:22
Wi-Fiの調子が悪い時に自動的に再接続をするためのシェルスクリプト(Mac用)
#!/bin/bash
while true
do
# タイムアウト(1秒)を設定してcurl
curl -m 1 google.com >/dev/null 2>&1
# curlに失敗
if [ $? -ne 0 ]
then
# Wi-Fiの再接続
@asid21
asid21 / get_all_follower_list_on_twitter.py
Last active November 23, 2024 23:39
Get all follower list on Twitter
#!/usr/bin/env python3
import re
import urllib.parse
import urllib.request
def getlist(cursor,userid):
url = 'https://api.twitter.com/1.1/followers/list.json?include_profile_interstitial_type=1&include_blocking=1&include_blocked_by=1&include_followed_by=1&include_want_retweets=1&skip_status=1&cursor='+cursor+'&user_id='+userid+'&count=20'
user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'
headers = {
'User-Agent':user_agent,
@asid21
asid21 / get_line_stamps.sh
Created December 8, 2017 16:24
Get LINE stamps image
#!/bin/sh
j=0
mkdir stamps
for i in $(ls /sdcard/Android/data/jp.naver.line.android/stickers)
do
cp $i stamps/$j.jpeg
j=$(expr $j + 1)
done
@asid21
asid21 / arp.sh
Created December 4, 2017 15:23
ARP Checker
#!/bin/bash
function usage() {
echo 'Usage: '$0' [-a] [update]'
echo ' -a Print arp table'
echo ' update Update arp table'
exit 1
}
if [ $# -lt 1 ]; then
usage