Skip to content

Instantly share code, notes, and snippets.

View shoaibi's full-sized avatar

Shoaibi shoaibi

View GitHub Profile
@ClickerMonkey
ClickerMonkey / types.ts
Last active September 16, 2025 22:30
Typescript Helper Types
// when T is any|unknown, Y is returned, otherwise N
type IsAnyUnknown<T, Y, N> = unknown extends T ? Y : N;
// when T is never, Y is returned, otherwise N
type IsNever<T, Y = true, N = false> = [T] extends [never] ? Y : N;
// when T is a tuple, Y is returned, otherwise N
// valid tuples = [string], [string, boolean],
// invalid tuples = [], string[], (string | number)[]
@oioki
oioki / freenom-free-meaningful-domains-2020-05-31.txt
Created May 31, 2020 21:19
Free freenom.com domains based on english_top10k_from_google.txt dictionary, as of 2020-05-31
with.ga
from.gq
your.gq
other.gq
they.cf
they.gq
their.ml
their.ga
their.cf
their.gq
@MichaelSimons
MichaelSimons / RetrievingDockerImageSizes.md
Last active January 22, 2026 12:18
Retrieving Docker Image Sizes

Retrieving Docker Image Sizes

There are two metrics that are important to consider when discussing the size of Docker images.

  1. Compressed size - This is often referred to as the wire size. This affects how fast/slow images can be pulled from a registry. This impacts the first run experience on machines where images are not cached.
  2. Uncompressed size - This is often referred to as the size on disk. This affects how much local storage is required to support your Docker workloads.

The example commands shown below will work on Windows, MacOS, and Linux.

How to Measure the Compressed Size

@so0k
so0k / kubectl.md
Last active February 4, 2025 17:16
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@akommareddi
akommareddi / Script Modify Headers
Last active May 22, 2023 08:19
HowTo: Script Modify Headers for Google Chrome extension using Selenium
System.setProperty("webdriver.chrome.driver",
"/opt/tools/selenium-2.45.0/chromedriver");
File addonpath = new File(
"/opt/tools/selenium-2.45.0/innpjfdalfhpcoinfnehdnbkglpmogdi.crx");
ChromeOptions options = new ChromeOptions();
options.addExtensions(addonpath);
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
@j3j5
j3j5 / gist:8b3e48ccad746b90a54a
Last active August 12, 2025 13:40
Adyen Test Card Numbers
Adyen Test Card Numbers
These cards are only valid on our TEST system and they will never involve any actual transaction or transfer of funds. The TEST card numbers will not work on the Adyen LIVE Platform.
For all cards use the following expiration and CVV2/CVC2/or CID for Amex.
For all cards:
Expiration Dates CVV2 / CVC3 CID (American Express)
08/2018 OR 10/2020 737 7373
@sylvaincombes
sylvaincombes / my-external-ip.sh
Last active January 2, 2026 12:42
View your external ip from linux / unix shell
# with dig (fastest way)
dig +short myip.opendns.com @resolver1.opendns.com;
# alternative
dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'"' '{ print $2}';
######################################################################################################
## Other method with curl / get and 3rd party, this choice is less judicious
######################################################################################################
# with curl
@nlochschmidt
nlochschmidt / bootstrapFieldConstructor.scala.html
Last active December 23, 2015 20:09
hack to use Play 2.2 form helper with Bootstrap 3
@(elements: views.html.helper.FieldElements)
@**************************************************
* Generate input according twitter bootsrap rules *
**************************************************@
<div class="input-group @elements.args.get('_class) @if(elements.hasErrors) {has-error}" id="@elements.args.get('_id).getOrElse(elements.id + "_field")">
<label class="sr-only" for="@elements.id">@elements.label(elements.lang)</label>
@elements.input
<div class="control-label" for="@elements.id">@elements.errors(elements.lang).mkString(", ")</div>
@JaggedJax
JaggedJax / stack_trace.php
Last active November 3, 2015 23:34
Simple human readable stack trace for PHP scripts or Web
<?php
/**
* Print out a stack trace from entry point to wherever this function was called.
* @param boolean $show_args Show arguments passed to functions? Default False.
* @param boolean $for_web Format text for web? Default True.
* @param boolean $return Return result instead of printing it? Default False.
*/
public static function stack_trace($show_args=false, $for_web=true, $return=false){
if ($for_web){
$before = '<b>';
@ziadoz
ziadoz / awesome-php.md
Last active May 8, 2025 07:37
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.