Skip to content

Instantly share code, notes, and snippets.

View tjunussov's full-sized avatar

Tim TJey Jun tjunussov

View GitHub Profile
@tjunussov
tjunussov / index.html
Created November 28, 2017 08:35
SM Calendar // source http://jsbin.com/kumewog
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>SM Calendar</title>
<script src="https://unpkg.com/vue@latest/dist/vue.js"></script>
<style id="jsbin-css">
html,body {
height:300px;
////////////// HTML - CONSOLE.log ///////
<pre id="log"></pre>
(function () {
var _log = console.log;
var logger = document.getElementById("log");
console.log = function (message) {
if (typeof message == "object") {
logger.innerHTML += (JSON && JSON.stringify ? JSON.stringify(message) : message) + "\n";
@tjunussov
tjunussov / Linux ESCPOS Raw Printer
Last active June 20, 2018 11:29
listen on port and pass data to printer
chmod 666 /dev/usb/lp0
nc -lvk 9100 > /dev/usb/lp0
# l listen
# k liten forever
# v verbose
##
## Generating client certificatie
## https://gist.github.com/mtigas/952344
## sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout bein.tech.key -out bein.tech.crt
# openssl genrsa -des3 -out bein.tech.key 4096
# openssl req -new -x509 -days 365 -key bein.tech.key -out bein.tech.crt
# openssl req -new -key client.key -out client.csr
# ---- or
## DEFAULT
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name host1.org host2.org;
autoindex off;
log_not_found off;
client_max_body_size 1M;
@tjunussov
tjunussov / RPI Network interfaces
Last active November 3, 2018 11:01
Rapberry Pi Network Static dual IT Address
##sudo iwlist wlan0 scan
##
nano /etc/network/interfaces
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp
firewall-cmd --zone=public --permanent --add-masquerade
firewall-cmd --zone=external --permanent --add-masquerade
firewall-cmd --zone=public --query-masquerade
firewall-cmd --zone=internal --add-masquerade --permanent
firewall-cmd --zone=public --add-forward-port=port=6554:proto=udp:toport=554:toaddr=10.0.2.60 --permanent
firewall-cmd --reload
firewall-cmd --permanent --zone=public --add-port=6555/tcp
firewall-cmd --list-all --zone=public
# Double Remote Repositories
git remote set-url --add --push origin [email protected]:tjunussov/uyi.dashboard.git
# Git Add,Commit,Push shourtcut
git acp "Message"
# Git ignore file update
git rm -r --cached .
1 Install USB 2 UART drivers
https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
Neopixel D4 output must be specified exactly as D4 npt just 4
#define PIN D4