Skip to content

Instantly share code, notes, and snippets.

View ekapujiw2002's full-sized avatar

Eka Puji Widiyanto ekapujiw2002

View GitHub Profile
// Needed in AndroidManifest:
<!-- Permission for using NFC hardware -->
<uses-permission android:name="android.permission.NFC"/>
<!-- Forcing device to have NFC hardware -->
<uses-feature android:name="android.hardware.nfc" android:required="true"/>
<!-- Registering app for receiving NFC's TAG_DISCOVERED intent -->
<intent-filter>
<action android:name="android.nfc.action.TAG_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
@ekapujiw2002
ekapujiw2002 / sed cheatsheet
Created October 14, 2020 13:44 — forked from un33k/sed cheatsheet
magic of sed -- find and replace "text" in a string or a file
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@ekapujiw2002
ekapujiw2002 / install-arch-linux-rpi-zero-w.sh
Created October 7, 2020 23:53 — forked from larsch/install-arch-linux-rpi-zero-w.sh
Install Arch Linux ARM for Raspberry Pi Zero W on SD Card (with commands to configure WiFi before first boot).
#!/bin/sh -exu
dev=$1
cd $(mktemp -d)
function umountboot {
umount boot || true
umount root || true
}
# RPi1/Zero (armv6h):
@ekapujiw2002
ekapujiw2002 / rpi3_iot_server.md
Created July 24, 2020 23:39 — forked from xoseperez/rpi3_iot_server.md
Raspberry Pi 3 with Mosquitto, Node-RED, InfluxDB, Grafana and Nginx (as a reverse proxy)
@ekapujiw2002
ekapujiw2002 / ssl-check.py
Created July 10, 2020 01:20 — forked from gdamjan/ssl-check.py
Python script to check on SSL certificates
# -*- encoding: utf-8 -*-
# requires a recent enough python with idna support in socket
# pyopenssl, cryptography and idna
from OpenSSL import SSL
from cryptography import x509
from cryptography.x509.oid import NameOID
import idna
from socket import socket
/**
Useful links
https://wiki.wemos.cc/products:d1:d1_mini
https://cdn-images-1.medium.com/max/1400/1*YKc8KpAfMrlhrOLmNjdRwQ.png (D1 full pinout)
https://github.com/Jorgen-VikingGod/ESP8266-MFRC522
https://github.com/miguelbalboa/rfid
d1 mini rc52 wiring
https://discourse-cdn-sjc1.com/business5/uploads/mydevices/original/2X/e/ecedba79dc05f2c0b02b7fba8b3da2681590a11a.jpg
@ekapujiw2002
ekapujiw2002 / craft-popular-urls
Created November 28, 2019 08:23 — forked from demersdesigns/craft-popular-urls
A list of the 100 most popular website URLs for import into Craft from InVision. http://invisionapp.com/craft Content generated from https://en.wikipedia.org/wiki/List_of_most_popular_websites
@ekapujiw2002
ekapujiw2002 / my.cnf
Created October 7, 2019 07:00 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaSQL (on Ubuntu, CentOS etc. servers)
# Optimized my.cnf configuration for MySQL/MariaSQL
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# === Updated December 2018 ===
#
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores.
# If you have less or more resources available you should adjust accordingly to save CPU,
# RAM and disk I/O usage.
# The settings marked with a specific comment or the word "UPD" after the value
@ekapujiw2002
ekapujiw2002 / nginx.conf
Created September 27, 2019 07:09 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@ekapujiw2002
ekapujiw2002 / Arduino_telnet_Server.pde
Created September 14, 2019 12:18 — forked from atomsfat/Arduino_telnet_Server.pde
Arduino telnet server
/* *
* Arduino Telnet Server *
* 7 July 2010 *
* Basic Arduino I/O via *
* a command line interface *
* by Steve Lentz *
* stlentz[at]gmail[dot]com *
Quick Start Instructions:
1) Set Ethernet address in code below.