Skip to content

Instantly share code, notes, and snippets.

@ColeMundus
ColeMundus / .shit
Last active November 19, 2017 18:25
ids = requests.get('https://api.pushshift.io/reddit/submission/comment_ids/' + postID).json()['data']
c = []
for x in chunks(ids, 500):
c += requests.get('https://api.pushshift.io/reddit/search/comment/?ids=' + ','.join(x)).json()['data']
import requests
from pprint import pprint
postID = '7dn55x'
c=requests.get('https://api.pushshift.io/reddit/search/comment/?ids=' + ','.join(requests.get('https://api.pushshift.io/reddit/submission/comment_ids/' + postID).json()['data'])).json()['data']
post = {'post':[]}
for b in c:
if b['parent_id'][3:] == postID:
post['post'].append(b['id'])
for i, b in enumerate(post['post']):
temp = {b:[]}
@ColeMundus
ColeMundus / spider.sh
Last active November 12, 2017 05:32 — forked from azhawkes/spider.sh
Really simple wget spider to obtain a list of URLs on a website, by crawling n levels deep from a starting page.
#!/bin/bash
HOME="http://listen.tidal.com"
DOMAINS="listen.tidal.com"
OUTPUT="./urls.csv"
wget -r --spider --delete-after --force-html -D "$DOMAINS" "$HOME" 2>&1 \
| grep '^--' | awk '{ print $3 }' | grep -v '\. \(css\|js\|png\|gif\|jpg\)$' | grep '/album/' | sort | uniq > $OUTPUT

The Eye FAQ

The Eye is a website dedicated towards archiving and serving publicly available information.

We currently host large scale data-sets such as Reddit archives, old console video-games, operating systems and old software installation files.

How do I download these files?

The easiest way is to use wget, you can find a guide for using wget here

@ColeMundus
ColeMundus / TheEyeFAQ.md
Last active November 5, 2017 23:44 — forked from PurpleBooth/README-Template.md
A template to make good README.md

The Eye FAQ

The Eye is a website dedicated towards archiving and serving publicly available information.

We currently host large scale data-sets such as Reddit archives, old console video-games, operating systems and old software installation files.

How do I download these files?

The easiest way is to use wget, you can find a guide for using wget here

https://www.lynda.com/Education-Instructional-Design-tutorials/100-Courses-Counting-David-Rivers-Elearning/180212-2.html
https://www.lynda.com/Illustrator-tutorials/11-Things-Every-Beginner-Needs-Learn-Love-Illustrator/123437-2.html
https://www.lynda.com/Acrobat-tutorials/11-Things-Every-Newspaper-Should-Know-About-PDFs/123473-2.html
https://www.lynda.com/Bridge-tutorials/11-Tricks-Faster-Photo-Processing-Bridge-Photoshop/123438-2.html
https://www.lynda.com/3ds-Max-tutorials/12-Principles-Animation-CG-Animators/474685-2.html
https://www.lynda.com/Songwriting-tips/20-Unofficial-Rules-Songwriting/408234-2.html
https://www.lynda.com/lynda-com-Presents-tutorials/2010sbiffdirectorspanelondirecting/79035-2.html
https://www.lynda.com/lynda-com-Presents-tutorials/2010sbiffproducerspanelmoversandshakers/79036-2.html
https://www.lynda.com/lynda-com-Presents-tutorials/2010sbiffwomenspanelcreativewomeninthebusiness/79037-2.html
https://www.lynda.com/lynda-com-Presents-tutorials/2010sbiffwriterspanelitstartswiththescript/
root@scw-ff6f04:~# sudo service nginx restart
Job for nginx.service failed because a timeout was exceeded. See "systemctl status nginx.service" and "journalctl -xe" for details.
root@scw-ff6f04:~# systemctl status nginx.service
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: timeout) since Fri 2017-09-22 21:11:55 UTC; 6s ago
Process: 989 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=killed, signal=TERM)
Process: 1132 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Process: 1129 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 1560 (code=killed, signal=KILL)
for i,g in enumerate(tqdm(imgur)):
if re.match('http://imgur.com/gallery/', g[2]):
imgurGallery.insert(len(imgurGallery),g)
root@cpa:~/DefCon_JtrMakeConfig# make
g++ -c jtrMakeConfig.c
jtrMakeConfig.c: In function ‘int displayMain()’:
jtrMakeConfig.c:194:83: warning: unknown conversion type character ‘^’ in format [-Wformat=]
printf("(1) Modify the character sets, (aka special characters =[!@#$%^&*])\n");
^
g++ jtrMakeConfig.o -o jtrMakeConfig
root@cpa:~/DefCon_JtrMakeConfig# make install
make: *** No rule to make target 'install'. Stop.
root@cpa:~/DefCon_JtrMakeConfig#
[aion ~/private/rtorrent] aria2c -j10 --bt-hash-check-seed=false --bt-max-open-files=500 --bt-max-peers=0 --bt-seed-unverified=true --continue=true --seed-ratio=100.0 --enable-dht=false --enable-peer-exchange=false --always-resume=true -V -T ~/Nintendo\ Wii\ -\ Scrubbed\ Retail\ Collection\ \(NTSC\).torrent
07/27 17:30:18 [NOTICE] Downloading 1 item(s)
07/27 17:30:18 [NOTICE] Download complete: /media/fd25/cole/private/rtorrent/Nintendo Wii - Scrubbed Retail Collection (NTSC)
07/27 17:30:18 [NOTICE] Your share ratio was 0.0, uploaded/downloaded=0B/2,153GiB
Download Results:
gid |stat|avg speed |path/URI