Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
import time
import praw
from praw.errors import InvalidUserPass, RateLimitExceeded
bot = praw.Reddit('bf monitor')
username = 'test'

Keybase proof

I hereby claim:

  • I am dvl on github.
  • I am xdvl (https://keybase.io/xdvl) on keybase.
  • I have a public key whose fingerprint is C2A1 B32E 70FA 18AB 6B76 62AD 9754 691F 790D 3CEE

To claim this, I am signing this object:

@dvl
dvl / index.html
Last active August 29, 2015 14:17
Registered users: {{ view.total_users }}
# -*- coding: utf-8 -*-
import functools
def ensure_types(f):
@functools.wraps(f)
def wrapper(*args: list, **kwargs: dict):
if f.__annotations__:
for arg in args:
@dvl
dvl / .env
Created February 9, 2015 22:29
DEBUG=1
ALLOWED_HOSTS='.localhost, .alerte.com'
SECRET_KEY=s3cr3t_k3y
CACHE_LOCATION=127.0.0.1:6379:1
DATABASE_URL=postgres://postgres:deadpool@localhost/delphos
# -*- coding: utf-8 -*-
""" Add all torrrents downloaded from what.cd in
origin to transmission via transmission-remote and
create a separated folder for each artist. """
import glob
import os
import subprocess
import shutil
@dvl
dvl / install.sh
Last active August 29, 2015 13:59
#!/bin/bash
set -e
sudo apt-get -y update
sudo apt-get -y dist-upgrade
sudo apt-get -fy install
<?php
function _hot($upvotes = 0, $downvotes = 0, $posted = 0) {
$s = $upvotes - $downvotes;
$order = log(max(abs($s), 1), 10);
if ($s > 0) {
$sign = 1;
}
elseif($s < 0) {
@dvl
dvl / fancytree.html
Created February 28, 2014 04:41
jquery fancytree html markup
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JQuery FancyTree</title>
<link href="skin-lion/ui.fancytree.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="tree">
@dvl
dvl / nginx.conf
Created November 18, 2013 14:22
nginx.conf for cloudflare
user apache;
worker_processes auto;
worker_rlimit_nofile 8192;
pid /var/run/nginx.pid;
events {
worker_connections 2048;
multi_accept on;