Skip to content

Instantly share code, notes, and snippets.

@awestbro
awestbro / index.html
Created April 19, 2020 14:54
Highlighting margin, border, and padding with Javascript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Highlighting elements example</title>
</head>
<body>
@raphaelvallat
raphaelvallat / bruteforce.py
Last active May 29, 2024 05:57
Password brute-force in Python
"""
Password brute-force algorithm.
List of most probable passwords and english names can be found, respectively, at:
- https://github.com/danielmiessler/SecLists/blob/master/Passwords/probable-v2-top12000.txt
- https://github.com/dominictarr/random-name/blob/master/middle-names.txt
Author: Raphael Vallat
Date: May 2018
Python 3
@zerobias
zerobias / safe-padding.css
Last active May 29, 2024 05:51
Safe body paddings with env() and max() support
/* size variables */
:root {
--md: 8px;
--md-2: calc(var(--md) * 2);
--md-3: calc(var(--md) * 3);
--md-4: calc(var(--md) * 4);
}
/* safe area defaults */
@staltz
staltz / introrx.md
Last active May 29, 2024 05:51
The introduction to Reactive Programming you've been missing
@ECHO OFF
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Private goto MDPrivate
:CONFIRM
echo Are you sure to lock this folder? (Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
@NoteAfterNote
NoteAfterNote / note-after-note-2024-may-19-termux-usbredirect-qemu.md
Last active May 29, 2024 05:47
Reading and writing a USB drive connected to a Linux server using Termux, termux-usb, usbredirect, and QEMU on a smartphone that is not rooted
@Mahedi-61
Mahedi-61 / cuda_11.8_installation_on_Ubuntu_22.04
Last active May 29, 2024 05:44
Instructions for CUDA v11.8 and cuDNN 8.9.7 installation on Ubuntu 22.04 for PyTorch 2.1.2
#!/bin/bash
### steps ####
# Verify the system has a cuda-capable gpu
# Download and install the nvidia cuda toolkit and cudnn
# Setup environmental variables
# Verify the installation
###
### to verify your gpu is cuda enable check
@pjobson
pjobson / plex_double_nat.md
Last active May 29, 2024 05:42
PLEX Double-NAT Setup

PLEX Double-NAT Setup

In the PLEX Troubleshooting Remote Access they have a small section on setting up for Double-NAT, but don’t really get into how to actually do it. In my network I am using a Double-NAT setup with FIOS.

I use the FIOS AC1750 router from which I run an ethernet connection to a Buffalo WZR-HP-AG300H running OpenWRT to which I have my PLEX server and other internet devices connected.

Network Diagram

Here’s a simple diagram of my network.

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active May 29, 2024 05:35
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+