Skip to content

Instantly share code, notes, and snippets.

@dseg
dseg / nftables.conf
Created April 22, 2016 07:45
A basic nftables config. Only accept ssh, http and https.
#!/usr/bin/nft -f
# ipv4/ipv6 Simple & Safe Firewall
# you can find examples in /usr/share/nftables/
table inet filter {
chain input {
type filter hook input priority 0;
# allow established/related connections
ct state {established, related} accept
@vlucas
vlucas / encryption.js
Last active March 28, 2024 17:36
Stronger Encryption and Decryption in Node.js
'use strict';
const crypto = require('crypto');
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bits (32 characters)
const IV_LENGTH = 16; // For AES, this is always 16
function encrypt(text) {
let iv = crypto.randomBytes(IV_LENGTH);
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv);
@0xdevalias
0xdevalias / _deobfuscating-unminifying-obfuscated-web-app-code.md
Last active March 28, 2024 17:36
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
@ptheywood
ptheywood / gs-windows.md
Last active March 28, 2024 17:34
Instructions for PDF compression via Ghostscript on Windows

Ghostscript PDF compression on Windows

Installation

  1. Download and install Ghostscript for windows (http://downloads.ghostscript.com/public/gs916w32.exe)
  2. Optional - Add the ghostscript directory to the path environment variable
    • Control Panel > System > Advanced System Settings > Environment Variables
    • Add ;C:\Program Files (x86)\gs\gs9.16\bin to th end of the PATH variable

Usage

@agoose77
agoose77 / flake.nix
Last active March 28, 2024 17:33
Python virtualenvironment flake
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = inputs @ {
self,
nixpkgs,
flake-utils,
...
@lcarsos
lcarsos / restore_functionality.sh
Last active March 28, 2024 17:32
Repeatedly kill sentinelone so you can actually use the processor and ram on your mac
#!/usr/bin/env bash
# Usage: sudo ./restore_functionality.sh
#ps aux | grep sentinel | awk -F " +" '{print $2}' | xargs kill
while true; do
launchctl kill SIGKILL system/com.crowdstrike.falcond
launchctl kill SIGKILL system/com.crowdstrike.userdaemon
launchctl kill SIGKILL system/com.sentinelone.sentineld
launchctl kill SIGKILL system/com.sentinelone.sentineld-helper
@bmaupin
bmaupin / free-database-hosting.md
Last active March 28, 2024 17:32
Free database hosting
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active March 28, 2024 17:32
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@rumansaleem
rumansaleem / clean-up-arch-linux.md
Created May 28, 2019 08:51
Instructions to clean up Arch Linux (Manjaro)

Contents

  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • remove old config files
  • Find and Remove
    • duplicates
    • empty files
    • empty directories
  • broken symlinks
@lohhans
lohhans / README-PTBR.md
Last active March 28, 2024 17:31 — forked from PurpleBooth/README-Template.md
Um modelo para fazer um bom README.md

Título do projeto

Um parágrafo da descrição do projeto vai aqui

🚀 Começando

Essas instruções permitirão que você obtenha uma cópia do projeto em operação na sua máquina local para fins de desenvolvimento e teste.

Consulte Implantação para saber como implantar o projeto.