Skip to content

Instantly share code, notes, and snippets.

View namuyan's full-sized avatar

namuyang namuyan

View GitHub Profile
@namuyan
namuyan / rpipypy.md
Last active August 29, 2019 15:42 — forked from troeger/rpipypy.md
Cross-compilation of PyPy for RaspberryPi
@namuyan
namuyan / doc.md
Last active March 12, 2020 02:07
How to install plyvel on wondows
@namuyan
namuyan / ipv6_server.py
Created December 26, 2018 08:56
Pythonのipv6のSocketサーバコード
import socket
import selectors
import sys
import time
HOST = None
# HOST = "localhost" # "::1" # "127.0.0.1", "None"
PORT = 2000
BACKLOG = 5
BUFSIZE = 1024
@namuyan
namuyan / index.js
Last active February 24, 2020 13:09 — forked from novi/logger.js
node-http-proxyを使ったWebsocket対応Proxy
let https = require('https'),
httpProxy = require('http-proxy'),
fs = require('fs');
var ssl = {
key: fs.readFileSync('/etc/letsencrypt/live/pycontract.tk-0002/privkey.pem', 'utf8'),
cert: fs.readFileSync('/etc/letsencrypt/live/pycontract.tk-0002/fullchain.pem', 'utf8')
};
@namuyan
namuyan / nanoPi-fire3.md
Last active November 12, 2018 13:06
nanoPi-fire3を使用する時の手順

Login

  • username: pi
  • password: pi

/etc/apt/sources.list のリンクを修正する

sed -e 's/192.168.1.9/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list > tmp.txt
@namuyan
namuyan / BananaPi-M3.md
Last active October 31, 2018 15:42
BananaPi-M3 の使用方法

Frequensy

熱いので周波数下げるべし

Wifi

ぶっちゃけIP取得まで確認できたが接続できなかった。

  1. sudo sh -c 'wpa_passphrase SSID PASSWORD >> /etc/wpa_supplicant/wpa_supplicant.conf'
  2. wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
  3. sudo modprobe bcmdhd
@namuyan
namuyan / setfreq.sh
Last active October 31, 2018 13:37
Bananaの周波数を下げて落ちるのを下げる🍌
#!/bin/bash
#Script to quickly adjust the CPU clock rate of the Banana Pi M3
# ____ _____ _ __ __ ____
# | _ \ | __ (_) | \/ |___ \
# | |_) | __ _ _ __ __ _ _ __ __ _ | |__) | | \ / | __) |
# | _ < / _` | '_ \ / _` | '_ \ / _` | | ___/ | | |\/| ||__ <
# | |_) | (_| | | | | (_| | | | | (_| | | | | | | | | |___) |
# |____/ \__,_|_| |_|\__,_|_| |_|\__,_| |_| |_| |_| |_|____/
#Nargren, 2016.09.03.
@namuyan
namuyan / portscan.py
Created September 30, 2018 03:12
Pythonでポートスキャンするプログラムを作成
from socket import socket, gethostbyname, AF_INET, SOCK_STREAM
from threading import Thread, Lock
from time import sleep, time
def _thread(address, ports, opened, lock):
while True:
with lock:
try:
port = ports.pop()