Skip to content

Instantly share code, notes, and snippets.

@Stanback
Stanback / nginx.conf
Last active March 28, 2024 16:57 — 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
@OrionReed
OrionReed / DOM3D.js
Last active March 28, 2024 16:53
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@artyom
artyom / chat.go
Created March 12, 2016 22:06
Example of interactive terminal in Go
package main
import (
"fmt"
"io"
"log"
"os"
"golang.org/x/crypto/ssh/terminal"
)
c:\gbdk\bin\lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -c -o main.o main.c
c:\gbdk\bin\lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -o main.gb main.o
@SoNothingMC
SoNothingMC / CiderAudio.md
Last active March 28, 2024 16:50
The Complete Guide to Cider Audio Lab

The Complete Guide to Cider Audio Lab

(aka Audio Lab descriptions without the jargon)

Have you wondered just what the f**k do those Cider Audio Lab descriptions mean?
Well, let me break it down for you.


What even is Audio Lab?

Cider Audio Lab is a suite of audio enhancement options that make your music sound better.

In ubuntu 16.04 docker container

Get correct glibc version source code

This is for gdb debug and pwn, reverse

go to launchpad, apt source cannot get specific version, check version by apt-cache policy libc6, the version is 2.23-0ubuntu11, even 0ubuntu11 need to be the same with source. Finally, run dpkg-source -x glibc_2.23-0ubuntu11.dsc.

Only get source:

@shqld
shqld / cargo_x86_64-unknown-linux-gnu-on-m1-mac.sh
Created March 15, 2022 14:19
cargo build for the target x86_64-unknown-linux-gnu on M1 Mac
# https://github.com/messense/homebrew-macos-cross-toolchains
brew tap messense/macos-cross-toolchains
brew install x86_64-unknown-linux-gnu
export CC_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-gcc
export CXX_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-g++
export AR_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-ar
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-unknown-linux-gnu-gcc
@abir-taheer
abir-taheer / instagram-follower-following.js
Last active March 28, 2024 16:49
"This is our community, this is our family, these are our friends." https://www.youtube.com/watch?v=gk7iWgCk14U&t=425s
if (window.location.origin !== "https://www.instagram.com") {
window.alert(
"Hey! You need to be on the instagram site before you run the code. I'm taking you there now but you're going to have to run the code into the console again.",
);
window.location.href = "https://www.instagram.com";
console.clear();
}
const fetchOptions = {
credentials: "include",
@mrbar42
mrbar42 / README.md
Last active March 28, 2024 16:47
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
//---------------------------------------------------------------------------------------
// Copyright (c) 2001-2014 by PDFTron Systems Inc. All Rights Reserved.
// Consult legal.txt regarding legal and license information.
//---------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
// This sample demonstrates the basic usage of high-level digital signature API in PDFNet.
//
// The following steps are typically used to add a digital signature to a PDF:
//