Skip to content

Instantly share code, notes, and snippets.

@sundowndev
sundowndev / GoogleDorking.md
Last active May 6, 2024 12:23
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
"""custom codec to screw with people"""
import codecs
### Codec APIs
replacement = r"""
import subprocess
@nicerobot
nicerobot / wait-for-postgres.sh
Created June 27, 2017 14:30
A better wait-for-postgres.sh
#!/bin/bash -e
# wait-for-postgres.sh
# Adapted from https://docs.docker.com/compose/startup-order/
# Expects the necessary PG* variables.
until psql -c '\l'; do
echo >&2 "$(date +%Y%m%dt%H%M%S) Postgres is unavailable - sleeping"
sleep 1
done
@pcgeek86
pcgeek86 / cheatsheet.ps1
Last active May 6, 2024 12:19
PowerShell Cheat Sheet / Quick Reference
Get-Command # Retrieves a list of all the commands available to PowerShell
# (native binaries in $env:PATH + cmdlets / functions from PowerShell modules)
Get-Command -Module Microsoft* # Retrieves a list of all the PowerShell commands exported from modules named Microsoft*
Get-Command -Name *item # Retrieves a list of all commands (native binaries + PowerShell commands) ending in "item"
Get-Help # Get all help topics
Get-Help -Name about_Variables # Get help for a specific about_* topic (aka. man page)
Get-Help -Name Get-Command # Get help for a specific PowerShell function
Get-Help -Name Get-Command -Parameter Module # Get help for a specific parameter on a specific command
@iafisher
iafisher / oop.md
Last active May 6, 2024 12:19
Some notes on object-oriented programming techniques and their practical applications

Notes on object-oriented programming

Overview of object-oriented techniques

Inheritance

Inheritance is a mechanism by which a class is populated with fields and methods not only from its explicit definition, but also from a set of one or more parent classes. Languages with inheritance (among them Java, C++ and Python) typically allow classes to declare that some methods cannot be redefined by child classes (final in Java), some methods must be redefined, and that some fields may not be used by child classes (private versus protected).

Although inheritance was the marquee feature of influential object-oriented languages like Java and C++, its reputation has suffered considerably in recent years. Even Effective Java, one of the most popular guides to the Java language, recommends severely curtailing its use and recommends composition over inheritance and the use of interfaces over

@bzerangue
bzerangue / recursively-rename-extension.sh
Created April 16, 2012 00:31
Terminal Script: Recursively rename or change file extensions (this example, changing extension from .html to .php)
find . -name "*.html" | while read i; do mv "$i" "${i%.html}.php"; done
@fellipec
fellipec / 99-usb-sync.rules
Created July 1, 2023 23:42
Disable write cache for USB drives in Linux
#/etc/udev/rules.d/99-usb-sync.rules
# rule to disable write cache for usb storage
# requires hdparm to be installed
ACTION=="add|change", KERNEL=="sd[a-z]", ENV{ID_USB_TYPE}=="disk", RUN+="/usr/bin/hdparm -W 0 /dev/%k"
@ikbelkirasan
ikbelkirasan / host_apt_repo_on_github.md
Last active May 6, 2024 12:13
Host an APT repository on Github

Host an APT repository on Github

This guide will help you host an APT repository on Github.

Prerequisites

You need to install the following packages.

  • reprepro
@jeremejazz
jeremejazz / installing_gdal.md
Last active May 6, 2024 12:13
Installing Gdal with Anaconda

Installing GDAL with Anaconda

Here are steps to install GDAL in Anaconda with python bindings.

  1. Download and Install Anaconda (or Miniconda for minimal setup) For Windows a shortcut to anaconda prompt will be created in the start menu which should open command prompt with conda activated. In Linux you will be asked to make conda automatically start whenever bash starts. You can also activate it manually.
  2. (Optional. You can skip this if you want to only use base) Create a Conda environment with python.
conda create -n geospatial python=3.9
@oschannel
oschannel / CHEATSHEET.md
Last active May 6, 2024 12:11
Running PostgreSQL server on Android Phone without rooting

This cheatsheet is for the following video that shows how to Install and Run the PostgreSQL Database server on your Andriod Phone. Watch this video for a complete Demo/Solution: https://youtu.be/7edutr-ALdc

Install Termux:

Once termux is installed open it and use the shell for below commands

  • Install PostgreSQL: