Skip to content

Instantly share code, notes, and snippets.

View snehesht's full-sized avatar

Snehesh snehesht

View GitHub Profile
# https://hakibenita.com/fast-load-data-python-postgresql
from typing import Iterator, Dict, Any, Optional
from urllib.parse import urlencode
import datetime
#------------------------ Profile
import time
@andy-thomason
andy-thomason / Genomics_A_Programmers_Guide.md
Created May 14, 2019 13:32
Genomics a programmers introduction

Genomics - A programmer's guide.

Andy Thomason is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.

https://www.genomicsplc.com

@wybiral
wybiral / noscript-tracking.go
Last active September 11, 2023 08:53
Tracking cursor position in real-time with remote monitoring (without JavaScript)
// Tracking cursor position in real-time without JavaScript
// Demo: https://twitter.com/davywtf/status/1124146339259002881
package main
import (
"fmt"
"net/http"
"strings"
)
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 4, 2024 05:06
set -e, -u, -o, -x pipefail explanation
@giannitedesco
giannitedesco / gash.py
Created August 30, 2018 08:13
Send secret messages to someone using their public ssh key
#!/usr/bin/python3
__copyright__ = "Copyright (c) 2018 Gianni Tedesco"
__licence__ = "GPLv3"
__doc__ = "Tool for sending secret messages using ssh keys"
from argparse import ArgumentParser
try:
import nacl.utils
from nacl.signing import SigningKey,VerifyKey
@johnhw
johnhw / umap_sparse.py
Last active January 6, 2024 16:09
1 million prime UMAP layout
### JHW 2018
import numpy as np
import umap
# This code from the excellent module at:
# https://stackoverflow.com/questions/4643647/fast-prime-factorization-module
import random
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active May 2, 2024 16:43
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API
@jkereako
jkereako / config.yaml
Last active August 11, 2022 18:18
Startup script for MITM Proxy.
scripts: [~/.mitmproxy/scripts/toggle_macos_proxies.py, ~/.mitmproxy/scripts/error_response.py]
view_filter: "~dst amazon.com|google.com"
console_mouse: false
console_palette: dark
console_eventlog_verbosity: error
@dvalters
dvalters / disk space.markdown
Last active January 2, 2024 15:53
Disk space usage

Disk space usage

Here are some notes on the various ways to check disk space usage on linux:

Disk usage of all (non-hidden) files and folders

Using the du command (disk use) with the -s (summarize) and -h (human-readable) options.

du -sh *