Skip to content

Instantly share code, notes, and snippets.

# # # # # # # # # #
# USAGE:
#
# $accelUri = ''
# . '/' . 'internal_google_drive'
# . '/' . $google_drive_file_id
# . '/' . $filename
# . '/' . $google_drive_access_token;
# http_response_code(204);
# header('X-Accel-Redirect: ' . rawurlencode($accelUri));
@ohhdemgirls
ohhdemgirls / vidble.sh
Created January 20, 2014 02:49
Simple Vidble.com Album Downloader
#!/bin/bash
id="$1"
host="http://vidble.com/album/"
mkdir "$id"
wget -nv -O - "$host$id" |grep -e "<img src='" |grep -Eo '/[^" ]+(jpg|jpeg|JPG|GIF|gif|PNG|png)' |sed -e 's/_med//' -e 's@^@http://vidble.com@' > $id/links.txt
sed -i '/logo/d' $id/links.txt
wget -i $id/links.txt -P $id
@ohhdemgirls
ohhdemgirls / vpn.md
Created October 9, 2017 19:58 — forked from joepie91/vpn.md
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

(A Russian translation of this article can be found here, contributed by Timur Demin.)

Why not?

#!/bin/sh
set -x
USER="$1"
API_URL="https://api.github.com/users/${USER}/repos?type=owner"
DATE=$(date +"%Y%m%d")
TEMP_DIR="github_${USER}_${DATE}"
BACKUP_FILE="${TEMP_DIR}.tgz"
@ohhdemgirls
ohhdemgirls / illegalhacks.md
Created December 21, 2019 02:46
A neutral reference for those considering illegal hacking

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512

A neutral reference for those considering illegal hacking

If you’re interested in computers, you’ve probably considered doing illegal hacking or other blackhat or hacktivist activities. If you’re interested in computer security, you’ve definitely considered it.

Unfortunately, there are not many good sources of advice for this issue. This guide attempts to thoroughly explore the question. We do not make any recommendations one way or another, we just present information so that readers are able to make more informed decisions.

Contents:

@ohhdemgirls
ohhdemgirls / threaded_httpd.py
Created August 3, 2017 01:54
Multi-threaded python httpd
#!/bin/env python
import SocketServer
import BaseHTTPServer
import SimpleHTTPServer
class ThreadingSimpleServer(SocketServer.ThreadingMixIn,
BaseHTTPServer.HTTPServer):
pass
import requests
from tqdm import tqdm
def download_file_from_google_drive(id, destination):
def get_confirm_token(response):
for key, value in response.cookies.items():
if key.startswith('download_warning'):
return value
return None
@ohhdemgirls
ohhdemgirls / arti.py
Last active November 12, 2018 08:35
Download images from the art institute of chicago.
#!/usr/bin/env python3
import json
import re
import sys
import time
import urllib
from parsel import Selector
@ohhdemgirls
ohhdemgirls / ffmpeg-html5
Created January 14, 2017 00:49 — forked from yellowled/ffmpeg-html5
Convert videos to proper formats for HTML5 video on Linux shell using ffmpeg. Will probably convert this to a bash script later, but for the time being, here's some examples. Not sure there have actually sensible dimensions and bitrates for web video.
# webm
ffmpeg -i IN -f webm -vcodec libvpx -acodec libvorbis -ab 128000 -crf 22 -s 640x360 OUT.webm
# mp4
ffmpeg -i IN -acodec aac -strict experimental -ac 2 -ab 128k -vcodec libx264 -vpre slow -f mp4 -crf 22 -s 640x360 OUT.mp4
# ogg (if you want to support older Firefox)
ffmpeg2theora IN -o OUT.ogv -x 640 -y 360 --videoquality 5 --audioquality 0 --frontend
udp://public.popcorn-tracker.org:6969/announce
http://182.176.139.129:6969/announce
http://5.79.83.193:2710/announce
http://91.218.230.81:6969/announce
udp://tracker.ilibr.org:80/announce