Skip to content

Instantly share code, notes, and snippets.

View anaganisk's full-sized avatar

SKA anaganisk

View GitHub Profile
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIU6dBww95+TcIe4M7YNISnMqeVG6bYhOKokqlfTNnV5 zephyr@DESKTOP-HR1EU10
@anaganisk
anaganisk / midterm.RMD
Last active April 11, 2022 22:17
mid term section 3
---
title: "Mid term"
output:
word_document: default
html_document:
df_print: paged
pdf_document: default
html_notebook: default
---
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
@anaganisk
anaganisk / sharp-pm2.ino
Created January 16, 2022 18:24
Shar dust sensor arduino interfacing
/*
Interface to Sharp GP2Y1010AU0F Particle Sensor
Program by Christopher Nafis
Written April 2012
http://www.sparkfun.com/datasheets/Sensors/gp2y1010au_e.pdf
http://sensorapp.net/?p=479
Sharp pin 1 (V-LED) => 5V (connected to 150ohm resister)
Sharp pin 2 (LED-GND) => Arduino GND pin
us.rdx2.lgtvsdp.com
us.info.lgsmartad.com
us.ibs.lgappstv.com
us.lgtvsdp.com
ad.lgappstv.com
smartshare.lgtvsdp.com
ibis.lgappstv.com
us.ad.lgsmartad.com
lgad.cjpowercast.com.edgesuite.net
ngfts.lge.com
Open up browser console, for Chrome, hit F12 and copy-paste and enter this
$("a").filter(function(index){return $(this).text()==="unsave"}).click();setTimeout(function(){location.reload();},500);
Repeat until all items are unsaved.
@anaganisk
anaganisk / yubipgp.asc
Created May 25, 2021 06:23
Pgp key with yubi
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBGCr4MwBCACIe0mBeY1Vu5w773l0ChXLbXlMGmjDD5qWhtnL7/vYtSKXkdrp
KoFGyHW7+6gORqjVATHhsyhexMBwlvXkmw1XolrINAfxBKs/b8HmbfL5U5/nPVuH
TW0wxNfDo0i9Hf2+nV7unwJ98WL7cFQJOwM5Stm2dsNG9Zn576eK6sc5BlZAnq2h
jz8x8FLkFnjo2p0C11UkQSeF7y080hNiSoyGDEG3gWnNUe3/TgkbCpVOxIf/5pG9
iy9eUc6RjhL+qxHxMFMeqByhUEBRLlOPVfYX2Y5JdP6IXYy499pSlmOWSGt3Vp2k
Iy7GVLCyOPZ8E8jANkZ7cH068Rmyi7wLaxqjABEBAAG0JFNhaSBLaXJhbiBBbmFn
YW5pIDxwZ3BAc2Fpa2lyYW4uZGV2PokBNgQTAQoAIAQLCQgHAhUKAhYBAhkBBYJg
q+DyAp4BApsDBYkB4tJyAAoJED+m+kNrkdVu+KMH/A09uchEkMIHZSkVu2BfPMl+
@anaganisk
anaganisk / hasura.sql
Last active May 10, 2021 14:22
Hasura postgres setup single or two user for lightsail or RDS
-- We will create a separate user to grant permissions on hasura-specific
-- schemas and information_schema and pg_catalog.
-- These permissions/grants are required for Hasura to work properly.
-- create a separate user for to manage metadata database
CREATE USER hasurauser WITH PASSWORD 'hasurauser';
-- create the schemas required by the hasura system
-- NOTE: If you are starting from scratch: drop the below schemas first, if they exist.
CREATE SCHEMA IF NOT EXISTS hdb_catalog;
@anaganisk
anaganisk / ffmpeg.md
Created April 25, 2021 04:52 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
@anaganisk
anaganisk / README.md
Created April 9, 2021 04:05 — forked from mrkpatchaa/README.md
Bulk delete github repos

Use this trick to bulk delete your old repos or old forks

(Inspired by https://medium.com/@icanhazedit/clean-up-unused-github-rpositories-c2549294ee45#.3hwv4nxv5)

  1. Open in a new tab all to-be-deleted github repositores (Use the mouse’s middle click or Ctrl + Click) https://github.com/username?tab=repositories

  2. Use one tab https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall to shorten them to a list.

  3. Save that list to some path

  4. The list should be in the form of “ur_username\repo_name” per line. Use regex search (Sublime text could help). Search for ' |.*' and replace by empty.