Skip to content

Instantly share code, notes, and snippets.

View Hitechcomputergeek's full-sized avatar

Hitechcomputergeek

View GitHub Profile
@hallettj
hallettj / global-variables-are-bad.js
Created February 14, 2009 21:15
How and why to avoid global variables in JavaScript
// It is important to declare your variables.
(function() {
var foo = 'Hello, world!';
print(foo); //=> Hello, world!
})();
// Because if you don't, the become global variables.
(function() {
@Fornoth
Fornoth / Notes.md
Last active September 27, 2023 17:52
Makes a device show up in spotify connect devices list, but nothing else yet

#Python Script Setup

To get the python script running, run either pip install flask or pip install -r requirements.txt if you used git clone to clone the gist

#libspotify_embedded_shared.so notes

##Using the library (still in progress) There's a compile.sh that compiles a program that calls SpInit(), but doesn't get any farther because it needs more than just the API version number (which is 4)

##Spotify appkey

@FlamingTempura
FlamingTempura / gist:3809f1ed6a2abc002df4
Created March 14, 2015 17:59
Archive a Simple Machines Forum (SMF) to html using wget
wget -m -np -a example.com_$(date +%Y%m%d).log -e robots=off -nv --adjust-extension --convert-links --page-requisites --reject-regex='(\?action=mlist|\?action=help|\?action=search|\?action=login|\?action=dlattach|\?action=reminder|\?action=register|\?action=credits|\?action=who|\?action=recent|\?action=celendar|\?action=stats|\?action=printpage|\?action=verificationcode|\.msg|sort[,=].+|prev_next[,=].+|wap2|action=\.xml|PHPSESSID)' http://example.com/
@ZipFile
ZipFile / Pixiv Public API.yaml
Last active August 7, 2022 14:11
Unofficial API specification extracted from Pixiv Android App
swagger: "2.0"
info:
title: "Pixiv Public API"
description: "Unofficial API specification extracted from Pixiv Android App v4.8.2"
version: "1.0"
host: public-api.secure.pixiv.net
schemes:
- https
basePath: /v1
produces:
@marcan
marcan / gamma_trick.sh
Last active July 10, 2024 01:54
Two images in one using the PNG gamma header trick.
#!/bin/sh
# PNG Gamma trick (by @marcan42 / marcan@marcan.st)
#
# This script implements an improved version of the gamma trick used to make
# thumbnail images on reddit/4chan look different from the full-size image.
#
# Sample output (SFW; images by @Miluda):
# https://mrcn.st/t/homura_gamma_trick.png
# https://www.reddit.com/r/test/comments/6edthw/ (click for fullsize)
# https://twitter.com/marcan42/status/869855956842143744
#DISCLAIMER
#I'm not the original author of the script...
#Original git repo vanished
function String-to-ByteArray ($String)
{
$ByteArray=@()
For ( $i = 0; $i -lt ($String.Length/2); $i++ )
{
$Chars=$String.Substring($i*2,2)
@oxagast
oxagast / pk5001z00pin.c
Last active May 6, 2018 16:15
Remote root Exploit for PK5001Z CenturyLink Routers.
/* PK5001Z CenturyLink Router/Modem remote root exploit */
/* oxagast / Marshall Whittaker */
/* marshall@likon:[~/Code/pk5001zpwn]: gcc pk5001z00pin.c -o pk5001z00pin */
/* marshall@likon:[~/Code/pk5001zpwn]: ./pk5001z00pin */
/* PK5001Z CenturyLink Router remote root 0day */
/* Enjoy! */
/* --oxagast */
/* marshall@likon:[~/Code/pk5001zpwn]: ./pk5001z00pin 192.168.0.1 */
/* */
/* # uname -a; id; */
@marcan
marcan / smbloris.c
Last active November 22, 2022 08:32
SMBLoris attack proof of concept
/* SMBLoris attack proof-of-concept
*
* Copyright 2017 Hector Martin "marcan" <marcan@marcan.st>
*
* Licensed under the terms of the 2-clause BSD license.
*
* This is a proof of concept of a publicly disclosed vulnerability.
* Please do not go around randomly DoSing people with it.
*
* Tips: do not use your local IP as source, or if you do, use iptables to block
@curi0usJack
curi0usJack / .htaccess
Last active July 9, 2024 18:38
FYI THIS IS NO LONGER AN .HTACCESS FILE. SEE COMMENTS BELOW. DON'T WORRY, IT'S STILL EASY.
#
# TO-DO: set |DESTINATIONURL| below to be whatever you want e.g. www.google.com. Do not include "http(s)://" as a prefix. All matching requests will be sent to that url. Thanks @Meatballs__!
#
# Note this version requires Apache 2.4+
#
# Save this file into something like /etc/apache2/redirect.rules.
# Then in your site's apache conf file (in /etc/apache2/sites-avaiable/), put this statement somewhere near the bottom
#
# Include /etc/apache2/redirect.rules
#
@ErikAugust
ErikAugust / spectre.c
Last active July 5, 2024 18:14
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif