Skip to content

Instantly share code, notes, and snippets.

@yrps
yrps / gs.sh
Last active November 13, 2017 17:46
Overlay image and text on a PDF with imagemagick and ghostscript
#!/bin/sh
set -eu
srcfile1="$1"
srcfile2="out.pdf"
out="${srcfile1%\.*}-signed.${srcfile1##*\.}"
gs -dBATCH -dNOPAUSE -dQUIET -sDEVICE=pdfwrite \
-dLastPage=1 -sOutputFile="$out" "$srcfile1" "$srcfile2"
from socket import *
import time
import os,sys
cport=40002
red=bytes('\xFF\x00\x00')
blue=bytes('\x00\xFF\x00')
green=bytes('\x00\x00\xFF')
black=bytes('\x00\x00\x00')
@tong
tong / liposomal-vitamin-c.md
Last active February 22, 2025 18:27
liposomal vitamin c

Liposomal Vitamin-C

Tools

  • Scale
  • Blender
  • Ultrasound cleaning device
  • Spoon (wooden|plastic|glas)
  • Mason jar for storage
@eugene-babichenko
eugene-babichenko / CMakeLists.txt
Last active July 1, 2023 18:01
CMakeLists.txt and toolchain file for building STM32 HAL-based projects generated with STM32CubeMX with arm-none-eabi-gcc. STM32CubeMX settings. Toolchain: SW4STM32. ☑ Generate under root.
set(PRJ_NAME CLion_STM_LED)
set(MCU_FAMILY STM32F1xx)
set(MCU_LINE STM32F103xB)
set(MCU_LINKER_SCRIPT STM32F103RBTx_FLASH.ld)
cmake_minimum_required(VERSION 3.6)
project(${PRJ_NAME} C ASM)
add_definitions(-D${MCU_LINE})
@ameliemaia
ameliemaia / three-examples-converter.js
Last active November 26, 2018 03:32
Convert threejs examples js to es6 - slightly hacky but works
var fs = require('fs');
require('shelljs/global');
const EXAMPLES_DIR = './node_modules/three/examples/js'
const DEST_DIR = './src/js/lib/three/examples'
mkdir('-p', DEST_DIR);
const files = [
`${EXAMPLES_DIR}/loaders/GLTFLoader.js`,
@nstarke
nstarke / slowloris.js
Last active December 15, 2017 21:01
Slowloris
var net = require('net');
var tls = require('tls');
var url = require('url');
var util = require('util');
var commander = require('commander');
commander.option('-u, --url [url]', 'Url to hit')
.option('-c, --connections [connections]', 'Connections to use simultaneously', 256, parseInt)
.option('-t, --timings [timings]', 'Which set of timings to use', 'default')
@jgamblin
jgamblin / MS17010.sh
Created May 15, 2017 14:12
A simple script to check your network for MS17-010 vulnerability using NMAP.
#!/bin/bash
ip=$1
cd ~/Desktop
mkdir MS17010
cd MS17010
wget https://raw.githubusercontent.com/cldrn/nmap-nse-scripts/master/scripts/smb-vuln-ms17-010.nse
nmap -oN MS17010.txt -p 445 --script "smb-vuln-ms17-010.nse" $ip
@philipjewell
philipjewell / photobucket_bulk_download.md
Last active March 29, 2023 00:23
Download all your photobucket images in bulk via CLI

backstory

On Jul 4, 2017 theverge.com posted an article about photobucket (silently) no longer allowing their users to source their images on 3rd party websites for free, thus leaving websites all over the web broken displaying the following image in replace:

Me being one of those individual, I attempted to go into my photobucket account and download my content as I now have my own hosting I am able to store those images on; however, the only ways to bulk download (on desktop) is by downloading albums through their interface. Doing so, gave me the following error message: "Hmmm. Something didn't click. Want to give it another shot? Try again now."

Doing this serveral times, in different browsers (chrome, firefox and safari), after disabling all my addons and extensions (including ad blockers), it still didn't work.

At this point, doing anything on their website w

@jhaddix
jhaddix / Testing_Checklist.md
Last active May 5, 2025 05:51 — forked from amotmot/WAHH_Task_Checklist.md
Fast Simple Appsec Testing Checklist
@monkbroc
monkbroc / usb_to_uart.ino
Last active September 21, 2018 17:32
Particle Photon USB to UART passthrough
/* Pass through all data from USB serial to UART serial (TX/RX pins)
*/
SYSTEM_THREAD(ENABLED);
SYSTEM_MODE(MANUAL);
void setup() {
Serial1.begin(9600);
Serial.begin();
}