Skip to content

Instantly share code, notes, and snippets.

View wwin3286tw's full-sized avatar
🎇
LifeHacking

Jack wwin3286tw

🎇
LifeHacking
  • Wiwynn
  • Taiwan
  • 11:11 (UTC +08:00)
View GitHub Profile
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Timer1.Enabled = True
Timer2.Enabled = True
Button1.Enabled = False
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Randomize()
@wwin3286tw
wwin3286tw / pure_gpio_74hc595.ino
Last active August 23, 2017 04:10
74HC595N 範例,只使用GPIO,74HC595N example, gpio only
//Author 撰寫者: https://www.facebook.com/ejtwn
//使用者須自負風險,若造成損壞恕不負責
//At your own risk.
//已經測試過(Tested board): Arduino Uno、ESP8266(NodeMCU)、ESP32、STM32F103
//Work on 5V or 3.3V
//根據Datasheet 供應電壓可支援到7V,According datasheet, supply power 7V max.
//OE connect to ground,OE請接低電位,負極
//MR PIN HIGH, MR需要接在高電位
//TI 74hc595n datasheet: http://www.ti.com/lit/ds/symlink/sn74hc595.pdf
  • 軟硬體、能力需求
  • 至少有張1GB DDR5顯示卡,是NVIDIA的更好

1. 本機初始環境建置(可選)

  • 作業系統
    • 本篇是對於 Ubuntu 16.04.3 全新安裝的主機所編寫的
  • 常用工具安裝
#apt-fast 安裝,多連線緒下載套件
sudo add-apt-repository ppa:apt-fast/stable
sudo apt-get update
sudo apt-get -y install apt-fast
@wwin3286tw
wwin3286tw / remote_bash.sh
Created July 17, 2018 12:54 — forked from n0ts/remote_bash.sh
execute bash script from remote site
# http://stackoverflow.com/questions/5735666/execute-bash-script-from-url
bash <(curl -s http://mywebsite.com/myscript.txt)
# http://stackoverflow.com/questions/4642915/passing-parameters-to-bash-when-executing-a-script-fetched-by-curl
curl http://foo.com/script.sh | bash -s arg1 arg2
@wwin3286tw
wwin3286tw / ANDROID_NDK_debug_guide.txt
Last active July 24, 2018 06:54
Android Studio NDK finished with non-zero exit value 2
DATE="2018-07-24"
APPLCATION="ANDROID STUDIO"
APPLCATION_VERSION={
Android Studio 3.1.3
Build #AI-173.4819257, built on June 5, 2018
JRE: 1.8.0_152-release-1024-b02 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 7 6.1
}
@wwin3286tw
wwin3286tw / A_BT-ftp-server.py
Last active July 14, 2020 03:05
Python Bluetooth Classic Serial Port Communication
#!/usr/bin/python2
# -*- coding: UTF-8 -*-
'''
###Code Summary###
作者: Jack
電子信箱: wwin3286tw
手機:xxxxxxxxxx
日期: 2018-09-26
時間: 09:16:20 GMT+8
描述: BlueTooth classic Serial port ccFTP(Control & Communication& File Transfer Protocol) Server
@wwin3286tw
wwin3286tw / screen_USB-UART.sh
Last active September 13, 2018 06:37
Linux USB RS232 Terminal
#!/bin/bash
#WARNING: Risk at your own, use screen command could cause terminal not controllable, may require reboot system to solve.
#Or open another SSH terminal to kill it.
#screen is not common pre-install package, use 'sudo apt-get install screen' to get it.
sudo screen /dev/ttyACM0
# To break the screen, Just fire AK-47 (ctrl+A then press 'K' only, release ctrl key)
@wwin3286tw
wwin3286tw / hc05_bluetooth_AT_command_test.ino
Last active December 4, 2018 05:26
HC05 藍芽模組,Ardunio測試用
#define BT_KEY_PIN 8
#define HARDWARE_SERIAL_SPEED 38400
void setup()
{
pinMode(BT_KEY_PIN, OUTPUT); //設定KEY_PIN為輸出模式
digitalWrite(BT_KEY_PIN, HIGH); //這將把藍芽模組的第34腳位拉高,使其進入AT模式
Serial.begin(HARDWARE_SERIAL_SPEED);
Serial.println("Bluebooth>"); //看到此提示,即可在串列終端機輸入想輸入的AT指令
@wwin3286tw
wwin3286tw / ufw.md
Created June 16, 2019 12:28 — forked from kimus/ufw.md
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.