Skip to content

Instantly share code, notes, and snippets.

View Kouni's full-sized avatar
:octocat:
I still loved what I did.

Kouni Kouni

:octocat:
I still loved what I did.
  • Kaohsiung, Taiwan
View GitHub Profile
@natmchugh
natmchugh / copying-Paxton-fobs.md
Last active October 8, 2025 15:55
How to copy, read and write Paxton fobs and cards with an RFIDler

How to copy, read and write Paxton fobs and cards with an RFIDler

A newer version of this info is available at https://badcfe.org/how-to-paxton-with-rfidler/

Paxton fobs and readers are popular in the UK especially the Net2 system where the fobs look like this with a blue ring: Paxton Fob

Paxton readers often look like this:

Paxton Reader

@henhan
henhan / nginx_documentation.md
Last active June 4, 2025 16:55
Extend and override nginx config for Elastic Beanstalk Amazon Linux 2

Extend and override nginx config for Elastic Beanstalk Amazon Linux 2

Documentation on how to override or extend the default nginx config on Elastic Beanstalk running om Amazon Linux 2. Correct as of 2021-08-01. Also see the general documentation on how to extend linux servers.

All references to placing files refer to putting a file at this location in your application bundle. You should never modify a file directly at your Elastic Beanstalk server by ssh:ing to the server, since such a change will be wiped whenever your servers autoscale or if you rebuild your application completely.

Adding a new location block

The easiest extension is to add a new location block to the main server block. This can be done by placing a .conf file with a server block in the folder .platform/nginx/conf.d/elasticbeanstalk. Any such file is automatically included in the main server block.

Overriding the default location

@pahud
pahud / remote_docker_host_m1.md
Last active April 8, 2024 14:00
Remote Docker Host for M1 laptop
  1. Open a new Amazon Linux 2 EC2(amd64) on AWS. Make it spot instance if you prefer.

ssh ec2-user@<EC2_IP> into the EC2 instance:

# install and start docker
$ sudo yum install -y docker
$ sudo service docker start
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active October 31, 2025 15:55
set -e, -u, -o, -x pipefail explanation
@seanickle
seanickle / AWS Athena timestamp select query .md
Last active September 4, 2023 00:51
AWS Athena timestamp select query

Doing a SELECT on a specific timestamp range

  • Here, the Athena table athena_table has the columns timestamp, day, month, year, id
select timestamp,month,day,year,id
from athena_table

WHERE month = 8 and day = 15
AND (CAST(timestamp as varchar) BETWEEN '2018-08-15 22:00:00' AND '2018-08-15 22:10:00')
 
@0xjac
0xjac / private_fork.md
Last active November 2, 2025 13:27
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@x43x61x69
x43x61x69 / udid.sh
Created March 21, 2016 16:43
Get UDID / serial number and hardware version of all connected Apple device in OS X.
system_profiler SPUSBDataType | awk '/:$/{sub(/^ */,"");name=$0}/Vendor ID:/{$1=$2=$3="";vender=$0}/Version:/{version=$2}/Serial Number:/{id=$3;print name,version,id,vender}' | grep 'Apple Inc.'
import speech_recognition
import pyttsx
speech_engine = pyttsx.init('sapi5') # see http://pyttsx.readthedocs.org/en/latest/engine.html#pyttsx.init
speech_engine.setProperty('rate', 150)
def speak(text):
speech_engine.say(text)
speech_engine.runAndWait()
anonymous
anonymous / gist:23448361fac0512688f2
Created October 24, 2014 12:44
Simple script for Linux Mint to install <windows key> # shortcuts to items 1-10 in the quicklaunch panel - requires dconf binary (dconf-cli package)
#!/usr/bin/python
import subprocess
import os.path
import re
import sys
#Requires dconf tool - available in Mint as dconf-cli
#run with -r argument to remove created shortcuts
@visioncan
visioncan / CasksInstall.sh
Last active December 29, 2021 01:56
CasksInstall
#!/bin/bash
# xcode command tool
xcode-select --install
# check
xcode-select -p
# homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"