Skip to content

Instantly share code, notes, and snippets.

@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">
<?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 / 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
# -*- 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 / .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 -*-
import functools
def ensure_types(f):
@functools.wraps(f)
def wrapper(*args: list, **kwargs: dict):
if f.__annotations__:
for arg in args:
@dvl
dvl / index.html
Last active August 29, 2015 14:17
Registered users: {{ view.total_users }}

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:

# -*- coding: utf-8 -*-
import time
import praw
from praw.errors import InvalidUserPass, RateLimitExceeded
bot = praw.Reddit('bf monitor')
username = 'test'
# -*- coding: utf-8 -*-
from django.conf.urls import include, url
from django.contrib import admin
# Text to put at the end of each page's <title>.
admin.site.site_title = 'Administração Infobusca'
# Text to put in each page's <h1>.
admin.site.site_header = 'Infobusca'