Skip to content

Instantly share code, notes, and snippets.

View dashdanw's full-sized avatar
🏠
Working from home

Dash Winterson dashdanw

🏠
Working from home
  • New York, NY
View GitHub Profile
@dashdanw
dashdanw / gist:26f941f303553cb2822d
Created May 8, 2014 08:55
Greasemonkey Script for FurAffinity (direct image links, auto-updates)
/****************************************************************************************
* FEATURES: *
* 1.In a gallery view press ctrl+alt+leftclick (windows,linux?) *
* or cmd+alt+leftclick (osx) to open the full sized image in a new tab *
* *
* 2.In a view page press ctrl+leftclick (windows, linux?) or *
* cmd+leftclick (osx) to open the image in a new tab, can also be *
* done by default by doing the same to "Download" *
* *
* 3.Automatically checks for new submissions, will dynamically change the *
@dashdanw
dashdanw / exploit.svg
Last active December 21, 2022 08:43
SVG Script Vulnerability POC
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dashdanw
dashdanw / cat etc lsb-release
Last active August 29, 2015 14:22
LBA-54 Environment
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"
charge = stripe.Charge.create(
amount=amount,
currency="usd",
application_fee=application_fee,
source=order.payment.token, #card_XXXXXXXX
#doesnt work as card='card_XXXXXXX' either
customer=order.buyer.token, #cust_XXXXXXXX
destination=order.seller.token #acct_XXXXXXXX
)
@dashdanw
dashdanw / middleware.py
Last active May 18, 2017 21:30
Django HyperText Coffee Pot Control Protocol Middleware Implementation (HTCPCP)
#implements HTCPCP as per RFC 2324 https://www.ietf.org/rfc/rfc2324.txt
from django.http import HttpResponse
class HTCPCPMiddleware(object):
coffee_list = [
'/coffee/black/',
'/coffee/espresso/'
]
#!/usr/bin/env python
import sys
import stripe
email = sys.argv[1]
print(stripe.customer.create(email=email))
#!/bin/bash
if [[ -z $(pip3 show scdl) ]]; then
sudo pip3 install scdl
fi
SCDL_TARGET="$1"
shift
SCDL_ADD_ARGS="$@"
SCDL_TARGET_DIR="$(pwd)/$SCDL_TARGET"
#!/bin/bash
if [[ -z $(pip3 show scdl) ]]; then
sudo pip3 install scdl
fi
SCDL_TARGET="$1"
shift
SCDL_ADD_ARGS="$@"
SCDL_TARGET_DIR="$(pwd)/$SCDL_TARGET"
from rest_framework import viewsets
from rest_framework.status import HTTP_400_BAD_REQUEST
from rest_framework.response import Response
from mixtape.music import serializers
from mixtape.music.models import Track
from mixtape.music.models import Artist
from mixtape.music.models import Album
@dashdanw
dashdanw / views.py
Created February 5, 2019 15:01
/tracks/<id>/upload
from rest_framework import viewsets
from rest_framework.status import HTTP_400_BAD_REQUEST
from rest_framework.response import Response
from mixtape.music import serializers
from mixtape.music.models import Track
from mixtape.music.models import Artist
from mixtape.music.models import Album