Skip to content

Instantly share code, notes, and snippets.

View hhankj2u's full-sized avatar

Khanh Nguyen hhankj2u

View GitHub Profile
@ericvitale
ericvitale / LGOLEDCX RF Codes Base64
Last active April 5, 2024 21:56
Base64 codes to use for the LG OLED CX TVs. Should work for others.
{
"version": 1,
"key": "broadlink_remote_a043b0XXXXXX_codes",
"data": {
"tv": {
"volume up": "JgBIAAABKJEVEBUQFTUVEBYQFRAVEBUQFTUWNRUQFTUVNhU1FTUVNhUQFTUVEBUQFREVEBUQFRAVNRYPFjUVNRU1FjUVNRU1FgANBQ==",
"volume_up": "JgBQAAABKJETEhUQFTUVEBURFBEVEBUQFTUUNxMSFTUVNhQ2FTUVNhQRFDYVEBUQFREUERQRFRAVNRURFDYUNhU1FjUWNBQ2FQAFHgABKUgVAA0F",
"volume_down": "JgBIAAABKJAWEBQRFTUVEBUQFREUERQRFTUVNhQRFTUVNRU2FTUVNhM3EzcVEBUQFREUERQRFRAVEBUQFTYUNhU1FDcUNhU1FQANBQ==",
"mute": "JgBIAAABJ5EWDxURFDYVEBUQFRAVERQRFTUVNRURFDYVNRU2FDYWNBU1FREVEBU1FRAVERQRFBEVEBU1FTYVEBU1FTUVNhU1FQANBQ==",
"input": "JgBIAAABJ5EWDxURFDYVEBUQFg8VERQRFDYVNRURFDYWNBU2FDYVNRU2FDYVEBU1FRAVERQRFRAVEBUQFTYUERU1FTUVNhQ2FQANBQ==",
@cristian-aldea
cristian-aldea / slick-terminal.md
Last active July 22, 2024 13:33
Ubuntu + Zsh + Oh My Zsh + Powerlevel10k = Sliiiiiiiiiiiiick

Based on: https://gist.github.com/kevin-smets/8568070

This gist outlines the steps needed to setup zsh, ohmyzsh and the powerlevel10k theme, available for anyone to follow.

  1. Setup required dependencies

    # update packages
    sudo apt update
    
"""
This file is based on https://github.com/foresmac/django-binaryuuidfield/tree/initial-setup
"""
import uuid
from django import forms
from django.core import exceptions
from django.db import models
from django.utils.translation import ugettext_lazy as _
@andrewsheley
andrewsheley / gist:8077a245027e4b06f5b7bb89efc6aa1e
Created July 13, 2019 22:17
Xamarin FontAwesome as Icons FAQ
To Use FontAwesome
1. Download Free FontAwesome fonts from website, grab the "Web" fonts. URL:https://fontawesome.com/download
2. Unzip and copy the font file into both Android and IOS projects. Verify build action.
a. For IOS add entry to info.plist at bottom before </dict> element.
<key>UIAppFonts</key>
<array>
<string>fa-solid-900.ttf</string>
</array>
@mrbar42
mrbar42 / README.md
Last active July 22, 2024 07:54
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
@davidrleonard
davidrleonard / add-team-to-repos.js
Last active May 8, 2024 15:11
Add a new team to all Github repos in an organization
/*
* Adds a team to all the repos in a Github organization. This is a tedious
* process in the UI. You'll need a newer version of node to run this (e.g 9+)
* because it uses async/await.
*
* Instructions:
*
* 1. Copy this file somewhere on your computer, e.g. ~/addteamrepos.js
* 2. Fill in the uppercase variables below with the right values
* 3. Run this file: `$ node ~/addteamrepos.js`
@singerng
singerng / Django_Default_Config.md
Last active July 25, 2023 20:13
Config for Django/Pipenv/Gunicorn/Nginx/Systemd.

Reasonable default configuration for a web app that uses Django and the following dependencies:

  • Pipenv: Python package manager
  • Gunicorn: WSGI server
  • Nginx: Static webserver passing to gunicorn, handling SSL, etc.
  • Systemd: Used to load Gunicorn on startup

This is my goto for setting up projects.

@suhlig
suhlig / install-tmux
Last active October 12, 2023 21:25 — forked from philipsd6/install-tmux
Install tmux on rhel/centos
# Install tmux on rhel/centos 7
# What do we want?
libeventversion=2.1.11
tmuxversion=3.1
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
@pvergain
pvergain / Dockerfile.centos7.python36.pipenv
Last active November 18, 2020 23:31
Dockerfile based on centos:7 Python3.6 and pipenv
# Use an official centos7 image
FROM centos:7
RUN localedef -i fr_FR -c -f UTF-8 -A /usr/share/locale/locale.alias fr_FR.UTF-8
ENV LANG fr_FR.utf8
# gcc because we need regex and pyldap
# openldap-devel because we need pyldap
RUN yum update -y \
&& yum install -y https://centos7.iuscommunity.org/ius-release.rpm \
@rmoff
rmoff / 0_update.adoc
Last active February 26, 2021 12:03
Example of Using Kafka Single Message Transform TimestampConverter