Skip to content

Instantly share code, notes, and snippets.

Always operating at maximum efficiency

Amin Shah Gilani amingilani

Always operating at maximum efficiency
View GitHub Profile
amingilani / index.html
Last active June 8, 2022 20:13 — forked from RubaXa/index.html
Array#indexOf vs. Array#includes ( #jsbench #jsperf
View index.html
<!DOCTYPE html>
<meta charset="utf-8"/>
<title>Array#indexOf vs. Array#includes</title>
<script src=""></script>
<script src="./suite.js"></script>
<h1>Open the console to view the results</h1>
amingilani / .gitmessage
Last active March 15, 2022 17:01
Git commit template
View .gitmessage
# Title: Summary, One-sentence headline description of change
# Start upper case, don't end with a period
# 50 chars max. This line is 50 chars long ######
# (Remember blank line between title and body.)
# Body: Explain *what* and *why* (not *how*).
# Add as many paragraphs as needed
amingilani /
Created June 26, 2021 12:44
Function that takes in a string of words and returns the subset of palindromes
def isolate_palindromes(words: str) -> str:
"""Takes in a string of words and returns the subset of palindromes
words (str): string of words, e.g. "bar kaak"
str: any palindromes within the string of words passed, e.g. "kaak"
amingilani / code.bash
Created January 20, 2021 23:15
Following all the users part of a GitHub organization
View code.bash
# Requires Hub (not the GitHub API) and JQ
ORGANIZATION= # Set this as the organization you want to follow
hub api --paginate /orgs/${ORGANIZATION}/members | jq ".[].login" | (xargs -I % hub api -X PUT /user/following/% && sleep 5)

Vim Cheat Sheet


  • End of the file: shift + g
  • Next line: j
  • Go down a defined number of lines: number + j
  • Skip to next word: w
amingilani /
Last active April 23, 2022 14:22
Frequency allocations to the amateur radio bands in Pakistan

Frequency allocations to the amateur radio bands in Pakistan according to the Frequency Allocation Board, in the Pakistan Table of Frequency Allocations. For information on primary and secondary allocations, other services, or citations, please see the original document.

DISCLAIMER: This table is a convenient lookup for ham radio enthusiasts, please use the original document as a canonical reference. I will not be liable for any problems that arise from the use of this table. If you find errors, though, please leave a comment and I'll fix them.

Please see the revisions tab for the date of last change.

|Unit |Range start|Range end|ITU – Region 3 |Pakis

amingilani / ruby-predefined
Created June 17, 2019 03:42
A list of constants and variables predefined in Ruby.
View ruby-predefined
$! --- The exception information message set by 'raise'.
$@ --- Array of backtrace of the last exception thrown.
$& --- The string matched by the last successful match.
$` --- The string to the left of the last successful match.
$' --- The string to the right of the last successful match.
$+ --- The highest group matched by the last successful match.
$1 --- The Nth group of the last successful match. May be > 1.
$~ --- The information about the last match in the current scope.
$= --- The flag for case insensitive, nil by default.
$/ --- The input record separator, newline by default.
amingilani / read-test.txt
Last active October 30, 2018 20:54
SanDisk 128 GB Ali Express buy — f3 test results
View read-test.txt
f3read "/Volumes/NO NAME"
F3 read 7.1
Copyright (C) 2010 Digirati Internet LTDA.
This is free software; see the source for copying conditions.
SECTORS ok/corrupted/changed/overwritten
Validating file 1.h2w ... 2097152/ 0/ 0/ 0
Validating file 2.h2w ... 2097152/ 0/ 0/ 0
Validating file 3.h2w ... 2097152/ 0/ 0/ 0
Validating file 4.h2w ... 2097152/ 0/ 0/ 0
amingilani / terraform-output-failure.txt
Created October 8, 2018 18:28
Filing a bug report for terraform-providers/terraform-provider-google
View terraform-output-failure.txt
$ terraform apply
google_container_cluster.primary: Refreshing state... (ID: worklark-cluster)
google_compute_firewall.default: Refreshing state... (ID: http-https)
google_container_node_pool.primary_pool: Refreshing state... (ID: us-central1-a/worklark-cluster/worklark-node-pool)
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
amingilani /
Last active September 9, 2019 04:15
My personal command to create new Ruby on Rails apps
# Default
echo 'Type the name of your app' && \
read appname && \
rails new $appname \
--database=postgresql `# My database choice` \
--skip-turbolinks `# Who the hell uses these` \
--skip-test `# I like to use Rspec` \
# MiniTest is fine