Skip to content

Instantly share code, notes, and snippets.

@dvl
dvl / FIle.sublime-settings.json
Last active December 21, 2015 18:09 — forked from etrepat/FIle.sublime-settings.json
My sublime text options
{
"auto_complete": true,
"auto_complete_delay": 50,
"auto_complete_selector": "source - comment",
"auto_complete_size_limit": 4194304,
"auto_complete_triggers":
[
{
"characters": "<",
"selector": "text.html"
@dvl
dvl / newbox.sh
Last active December 27, 2015 23:28
add-apt-repository ppa:xubuntu-dev/xfce-4.10 -y
add-apt-repository ppa:xubuntu-dev/xfce-4.12 -y
echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
apt-get update -y
apt-get install build-essential -y
apt-get install python-dev python-pip python-setuptools -y
apt-get install vim curl git -y
apt-get install postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 libpq-dev postgresql-server-dev-9.3 pgadmin3 -y
#!/bin/bash
#
# Install Postgres 9.3, PostGIS and create PostGIS template on an Ubuntu 12.04 Server
cd /tmp
# add official postgresql.org ubuntu repos (http://wiki.postgresql.org/wiki/Apt)
# Create /etc/apt/sources.list.d/pgdg.list. The distributions are called codename-pgdg.
echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
@dvl
dvl / install_cancer.sh
Created November 18, 2013 13:24
Every time when I need Java I never remember how install it without pain.
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install oracle-jdk7-installer
worker_processes auto;
worker_rlimit_nofile 8192;
user nginx;
pid /var/run/nginx.pid;
# error_log /var/log/nginx/error.log warn;
events {
worker_connections 2048;
multi_accept on;
@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;
@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