Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Bangon Kali bangonkali

🏠
Working from home
View GitHub Profile
@bangonkali
bangonkali / README.md
Created Feb 7, 2021
Certbot & NGINX Autorenew System
View README.md

Certbot & NGINX Autorenew System

Manual Renewal

certbot renew --pre-hook "service nginx stop" --post-hook "service nginx start"

Automated Renewal

@bangonkali
bangonkali / README.md
Created Oct 22, 2020
Azure Container Notes
View README.md

Download all files in a container

az login
az account set --subscription "subscription_id"
az storage blob download-batch -d . \
  --pattern "*.*" \
  -s "container_name" \
  --account-name "storage_account_name" \
  --connection-string "conntection_string"
View SnapCamera Clouds
https://www.snapchat.com/unlock/?type=SNAPCODE&uuid=249672733a114405ac286a0dd2dd1b9c&metadata=01
View synergy.md

Installing Synergy on Ubuntu 18.04

sudo apt-get install -y libavahi-compat-libdnssd1
sudo dpkg -i synergy_1.11.1.stable_b35+55ec3105_ubuntu18_arm64.deb

To start the Synergy client with systemd, create a service file: ~/.config/systemd/user/synergyc.service

View JsonUtils.ts
export class JsonUtils {
public static getCircularReplacer(): object {
const seen = new WeakSet();
return (key: string, value: object): any => {
if (typeof value === 'object' && value !== null) {
if (seen.has(value)) {
return;
}
seen.add(value);
}
View tfmini.ino
#include "SoftwareSerial.h"
SoftwareSerial swSer1;
void setup() {
// Debug serial
Serial.begin( 115200 );
// Serial connected to LIDAR sensor
// Serial.begin( 115200 );
@bangonkali
bangonkali / change_author.sh
Created Nov 21, 2019
This script changes the author of a certain git repository.
View change_author.sh
#!/bin/bash
# Change the GIT author
git filter-branch --env-filter '
export GIT_AUTHOR_NAME="bangonkali"
export GIT_AUTHOR_EMAIL="bangonkali@gmail.com"
' --tag-name-filter cat -- --branches --tags
View complete.txt
Current installation options:
default host triple: x86_64-apple-darwin
default toolchain: stable
profile: default
modify PATH variable: yes
View gist:16414ad9e051024b5bfcd7449c4c8f3c
For compilers to find icu4c you may need to set:
export LDFLAGS="-L/usr/local/opt/icu4c/lib"
export CPPFLAGS="-I/usr/local/opt/icu4c/include"
For pkg-config to find icu4c you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"
View elements_list_page_store.dart
import 'package:json_annotation/json_annotation.dart';
import 'package:mobx/mobx.dart';
part 'elements_list_page_store.g.dart';
@JsonSerializable()
class ElementsListPageStore extends _TempElementsListPageStore {
ElementsListPageStore() : super();
factory ElementsListPageStore.fromJson(Map<String, dynamic> json) =>