Skip to content

Instantly share code, notes, and snippets.

View irfn's full-sized avatar
🤩
stargazing!

Irfan Shah irfn

🤩
stargazing!
View GitHub Profile
@hyperupcall
hyperupcall / settings.jsonc
Last active July 5, 2024 20:20
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@sakethramanujam
sakethramanujam / Installing libgfortran3 for ubuntu20.04.md
Last active February 26, 2024 10:18
Installing libgfortran3 for ubuntu20.04.md

Installing libgfortran3 on ubuntu 20.04

Download the following debian packages either by navigating to the url or by doing a wget

Post Download install the packages by using a software installer or using the

$ sudo dpkg -i 
@sohamkamani
sohamkamani / rsa.go
Created April 12, 2020 17:31
Example of RSA encryption, decryption, signing, and verification in Go
package main
import (
"crypto"
"crypto/rand"
"crypto/rsa"
"crypto/sha256"
"encoding/base64"
"fmt"
)
@shilman
shilman / storybook-docs-typescript-walkthrough.md
Last active May 28, 2024 17:42
Storybook Docs Typescript Walkthrough

Storybook Docs w/ CRA & TypeScript

This is a quick-and-dirty walkthrough to set up a fresh project with Storybook Docs, Create React App, and TypeScript. If you're looking for a tutorial, please see Design Systems for Developers, which goes into much more depth but does not use Typescript.

The purpose of this walkthrough is a streamlined Typescript / Docs setup that works out of the box, since there are countless permutations and variables which can influence docs features, such as source code display, docgen, and props tables.

Step 1: Initialize CRA w/ TS

npx create-react-app cra-ts --template typescript
@fuxialexander
fuxialexander / 0_all_webkit.patch
Last active October 7, 2018 08:46
One-stop patch for Emacs NS-port xwidget (by @veshboo)
From 2063aad860376419d899d1ae06ccb7daf56ef9ef Mon Sep 17 00:00:00 2001
From: Jaesup Kwak <veshboo@gmail.com>
Date: Mon, 4 Dec 2017 21:23:19 +0900
Subject: [PATCH] Support xwidget webkit for macOS X
Add xwidget webkit support for macOS X / NS Cocoa and accompanying
changes.
Squash changes for comments from Alan Third in Bug#29565.
@pungoyal
pungoyal / aoe.sh
Last active October 7, 2018 10:48
AoE on Mac
brew cask install xquartz
brew install winetricks --with-wine
WINEPREFIX="$HOME/.wine32" WINEARCH=win32 winetricks directplay
WINEPREFIX="$HOME/.wine32" WINEARCH=win32 winetricks d3dx9_36
# from inside the AoE/AoC folder
WINEPREFIX="$HOME/.wine32" WINEARCH=win32 wine age2_x1/age2_X1
@larsch
larsch / install-arch-linux-rpi-zero-w.sh
Created July 6, 2017 06:05
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):
@Jakuje
Jakuje / README.md
Last active December 1, 2023 17:36
OpenSC test Sign, Verify, Encipher and Decipher from commandline with OpenSSL CLI
export PIN=111111
export SIGN_KEY=11
export ENC_KEY=55

Sign/Verify using private key/certificate

  • Create a data to sign

    echo "data to sign (max 100 bytes)" > data
    
@dannguyen
dannguyen / README.md
Last active July 6, 2024 16:36
Using Python 3.x and Google Cloud Vision API to OCR scanned documents to extract structured data

Using Python 3 + Google Cloud Vision API's OCR to extract text from photos and scanned documents

Just a quickie test in Python 3 (using Requests) to see if Google Cloud Vision can be used to effectively OCR a scanned data table and preserve its structure, in the way that products such as ABBYY FineReader can OCR an image and provide Excel-ready output.

The short answer: No. While Cloud Vision provides bounding polygon coordinates in its output, it doesn't provide it at the word or region level, which would be needed to then calculate the data delimiters.

On the other hand, the OCR quality is pretty good, if you just need to identify text anywhere in an image, without regards to its physical coordinates. I've included two examples:

####### 1. A low-resolution photo of road signs

@lewisd32
lewisd32 / iptableflip.sh
Created April 15, 2015 18:20
Snippet of Unbounce script for restarting HAProxy with zero downtime
echo "Flipping tables! (╯°□°)╯︵ ┻━┻"
num_rules=3
real=3 # exposed to the ELB as port 443
test=4 # used to install test certs for domain verification
health=5 # used by the ELB healthcheck
blue_prefix=855
green_prefix=866