Skip to content

Instantly share code, notes, and snippets.

View lucidBrot's full-sized avatar

Eric Mink lucidBrot

View GitHub Profile
#!/bin/bash
#
# escapeHTML.sh by Martin Wermers[1], 2018
# Written for my answer on the StackOverflow question 'Include another HTML file in a HTML file':
# https://stackoverflow.com/questions/8988855/include-another-html-file-in-a-html-file/15250208#15250208
#
# This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
# International License. See https://creativecommons.org/licenses/by-sa/4.0 .
#
# Credits to Greg Minshall[2] for the improved sed command that also escapes
@spacepatcher
spacepatcher / Breach Compilation (1.4 billion credentials) in Postgres.md
Last active April 23, 2024 18:03
Breach Compilation (1.4 billion credentials) in Postgres.md

What would you need:

Hardware requirements

@Potherca
Potherca / README.md
Last active March 28, 2023 04:29
Converting a webm file to GIF (using FFmpeg and Gifsicle)

Introduction

Sometimes I want to make a screencapture of a websites behaviour.

In Chrome, I am quite happy doing this with the [Awesome Screenshot: Screen Video Recorder][1] extension.

Besides screenshots, the extension offers the ability to make a recording. (Limited to 30 seconds in the free version).

The recording can be uploaded to Youtube or Google Drive. It can also be downloaded as WebM file.

@mvsde
mvsde / android-volume-steps.md
Last active April 14, 2024 00:04
Android Volume Steps

Android Volume Steps

Warning

This is a rather old guide and may or may not work with modern versions of Android.

Connect through ADB

  1. Boot into TWRP
  2. Connect device to computer
  3. Terminal: List devices with adb devices
@serycjon
serycjon / filter_events.py
Created September 20, 2018 09:33
Filter tensorflow event files
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
import sys
import argparse
import tqdm
import tensorflow as tf
@rjhansen
rjhansen / keyservers.md
Last active April 14, 2024 12:28
SKS Keyserver Network Under Attack

SKS Keyserver Network Under Attack

This work is released under a Creative Commons Attribution-NoDerivatives 4.0 International License.

Terminological Note

"OpenPGP" refers to the OpenPGP protocol, in much the same way that HTML refers to the protocol that specifies how to write a web page. "GnuPG", "SequoiaPGP", "OpenPGP.js", and others are implementations of the OpenPGP protocol in the same way that Mozilla Firefox, Google Chromium, and Microsoft Edge refer to software packages that process HTML data.

Who am I?

@xmodar
xmodar / covariance.py
Last active December 25, 2023 07:37
torch.cov and torch.corrcoef equivalent to np.cov and np.corrcoef, respectively with gradient support.
# https://github.com/pytorch/pytorch/issues/19037
# https://discuss.pytorch.org/t/covariance-and-gradient-support/16217
def cov(tensor, rowvar=True, bias=False):
"""Estimate a covariance matrix (np.cov)"""
tensor = tensor if rowvar else tensor.transpose(-1, -2)
tensor = tensor - tensor.mean(dim=-1, keepdim=True)
factor = 1 / (tensor.shape[-1] - int(not bool(bias)))
return factor * tensor @ tensor.transpose(-1, -2).conj()
def xxxx(x):
if x < 0 :
return 1
xx = 0
for xxx in range(10):
xx += xxxx(x-1-xxx)
return xx
xxxxxx = [0x370, 0x3aa, 0x1d3, 0x1f8, 0xaa, 0x244, 0x324, 0x2ad, 0x226, 0x224, 0x3dc, 0x2a9, 0x96, 0x13b, 0x9b, 0x251, 0x1e1, 0x7b, 0x317, 0x14f, 0x239, 0x29d, 0x18e, 0xac, 0x18e, 0x33a, 0x35, 0x45, 0x8b, 0xc0, 0x38e, 0x9e, 0x10d, 0x38c, 0x3cd, 0x193, 0x190, 0x16e, 0x35a, 0x5f, 0x66, 0x18d, 0x38, 0x3ce, 0x3c8, 0x239, 0xb4, 0x3b6, 0x3fb, 0x18d, 0xa9, 0x3fe, 0x32, 0x3a2, 0x25c, 0x90, 0x213, 0x3fb, 0x18b, 0x84, 0x2ba, 0x3e7, 0x32f, 0x327, 0x28f, 0x89, 0x20f, 0x10, 0x29, 0x35f, 0xbd, 0x32a, 0x2af, 0x1d5, 0x2d5, 0xd2, 0x88, 0x106, 0x3b9, 0x180, 0x240, 0x10d, 0x2c7, 0x5d, 0x1a1, 0x269, 0x185, 0x111, 0x327, 0x3c9, 0x21b, 0x4f, 0x37a, 0x233, 0x66, 0x148, 0xf5, 0x29e, 0x289, 0x284, 0x3a9, 0x122, 0x211, 0x33a, 0x17, 0xae, 0x33b, 0x1f1, 0x12f, 0x97, 0x23e, 0x11b, 0x140, 0x185, 0x2c1, 0x219, 0x1a, 0x23d, 0x35c, 0x20a, 0x309, 0x1a5, 0x189, 0x143, 0x142, 0x2dd, 0x14, 0x258, 0x2f9, 0x9b, 0x2e7, 0x396, 0x25b, 0x1ab, 0x297, 0x
package org.ygl.openrndr.demos
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.color.mix
import org.openrndr.color.rgb
import org.openrndr.draw.LineCap
import org.openrndr.draw.LineJoin
import org.openrndr.extra.compositor.compose
import org.openrndr.extra.compositor.draw
package org.ygl.openrndr.demos
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.draw.DrawPrimitive
import org.openrndr.draw.VertexElementType
import org.openrndr.draw.renderTarget
import org.openrndr.draw.shadeStyle
import org.openrndr.draw.vertexBuffer
import org.openrndr.draw.vertexFormat