Skip to content

Instantly share code, notes, and snippets.

@endolith
endolith / output.png
Last active April 18, 2024 04:22
Detecting rotation and line spacing of image of page of text using Radon transform
output.png
@shiritrong
shiritrong / gist:d85bb1e16c66d1a09896727780b4fc7c
Last active April 18, 2024 04:21
Windows 7 All Online/Offline [Retail-MAK] Activation Keys
Windows 7 All Online/Offline [Retail-MAK] Activation Keys
=================================================================================
. Run "Command Prompt" as Administrator
. slmgr.vbs -ipk Product Key
. slui4
=================================================================================
Windows 7 Ultimate Retail Phone Activation Keys
RHTBY-VWY6D-QJRJ9-JGQ3X-Q2289
V77DJ-CT8WB-Y3GXT-X3FBP-6F987
JC7BV-94FD2-D86PH-XRMHR-BXKDG
@BlockmanCodes
BlockmanCodes / 01_deployContracts.js
Created November 22, 2022 01:29
Uniswap V3 Flashloans and Arbitrage
const { Contract, ContractFactory, utils, BigNumber } = require("ethers")
const WETH9 = require("../WETH9.json")
const artifacts = {
UniswapV3Factory: require("@uniswap/v3-core/artifacts/contracts/UniswapV3Factory.sol/UniswapV3Factory.json"),
SwapRouter: require("@uniswap/v3-periphery/artifacts/contracts/SwapRouter.sol/SwapRouter.json"),
NFTDescriptor: require("@uniswap/v3-periphery/artifacts/contracts/libraries/NFTDescriptor.sol/NFTDescriptor.json"),
NonfungibleTokenPositionDescriptor: require("@uniswap/v3-periphery/artifacts/contracts/NonfungibleTokenPositionDescriptor.sol/NonfungibleTokenPositionDescriptor.json"),
NonfungiblePositionManager: require("@uniswap/v3-periphery/artifacts/contracts/NonfungiblePositionManager.sol/NonfungiblePositionManager.json"),
WETH9,
@colin-h
colin-h / clog-the-log.code-snippets
Last active April 18, 2024 04:12
Highly effective debugging snippet.
{
"CLOG THE LOG": {
"scope": "javascript,typescript,javascriptreact,typescriptreact",
"prefix": "clog",
"body": [
"console.log('$1', $1)"
],
"description": "Splits your cursor into two horcruxes allowing you to clog your log with variables more efficiently."
}
}
@rodricels
rodricels / .tmux.conf
Last active April 18, 2024 04:11
tmux configuration, mouse copy & paste added
# My tmux configuration, partly based on https://github.com/wbkang/wbk-stow/blob/master/tmux-config/.tmux.conf
# Scroll History
set -g history-limit 50000
# show messages for 4 seconds instead
set -g display-time 4000
# set first window to index 1 (not 0) to map more to the keyboard layout
set-option -g renumber-windows on
@cloudwu
cloudwu / rainwater.c
Last active April 18, 2024 04:07
Trapping rain water
#include <stdio.h>
static void
minmax(int height[], int n, int *min, int *max) {
int i;
*min = *max = height[0];
for (i=1;i<n;i++) {
if (height[i] < *min)
*min = height[i];
else if (height[i] > *max)
@tp
tp / line-segment-intersection.ts
Last active April 18, 2024 04:04
Line Segment Intersection
// based on: https://stackoverflow.com/questions/563198/how-do-you-detect-where-two-line-segments-intersect
import test from 'ava';
export interface Point2D {
readonly x: number;
readonly y: number;
}
export class LineSegment {
@gordonmurray
gordonmurray / convertCaddyCerts.md
Last active April 18, 2024 04:02
Steps to convert certificates generated by Caddy Server to certificates that Nginx can use

Convert Caddy Server certificates to LetsEncrypt certificates to be used by Nginx

Caddy

When using Caddy Server, it stores certificates in ~/.caddy/acme/acme-v01.api.letsencrypt.org/sites/{your domain name}/

3 files are stored in the folder called:

  • {yourdomain}.crt
  • {yourdomain}.json
  • {yourdomain}.key
@rokups
rokups / CMakeLists.txt
Last active April 18, 2024 04:01
Dear ImGui CMake build script.
#
# CMake build system for Dear ImGui
# =================================
#
# Build instructions:
# 1. Install latest CMake
# * Windows: https://cmake.org/download/ (Tick checkbox to place cmake in system PATH)
# * Linux: from your favorite package manager
# * MacOS: brew install cmake
# 2. Open command prompt in directory containing "imgui" and "imgui_dev" folders
@dogrocker
dogrocker / Wireless Penetration Testing Cheat Sheet.md
Created July 2, 2016 18:30
Wireless Penetration Testing Cheat Sheet

#Wireless Penetration Testing Cheat Sheet

##WIRELESS ANTENNA

  • Open the Monitor Mode
root@uceka:~# ifconfig wlan0mon down
root@uceka:~# iwconfig wlan0mon mode monitor
root@uceka:~# ifconfig wlan0mon up