Skip to content

Instantly share code, notes, and snippets.

@ramiro
ramiro / spotify.py
Last active January 21, 2018 15:47 — forked from sours/spotify.py
Simple Spotify xchat / Hexchat plugin. Runs on Windows and Linux. Based on https://gist.github.com/sours/5869011
from __future__ import print_function
"""Evolved from https://gist.github.com/sours/5869011
Now also supoports Hexchat and Linux."""
# Customize this:
#COMMAND_PREFIX = "say"
#COMMAND_PREFIX = "me is now listening"
COMMAND_PREFIX = "me np:"
from __future__ import print_function
import pymssql
import time
import logging
def connect():
return pymssql.connect(
server='IP.ADD.RE.SS',
user='username',
from __future__ import print_function
import _mssql
import time
import logging
def connect():
return _mssql.connect(
server='IP.ADD.RE.SS',
user='username',
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
#include <unistd.h>
#include <libgen.h>
#include <sybfront.h>
lanacion.com.ar##.modal-scrollable
clarin.com###cboxOverlay
clarin.com###colorbox
# clarin.com###cboxContent
@ramiro
ramiro / app1 0001_initial.py
Last active August 29, 2015 14:03
Field verbose_name in migrations when it contains non-ASCII characters
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
$ diff -u 1204-arecord.txt 1404-arecord.txt
--- 1204-arecord.txt 2014-04-02 22:54:51.917591000 -0300
+++ 1404-arecord.txt 2014-04-04 05:39:00.269743700 -0300
@@ -1,8 +1,7 @@
**** List of CAPTURE Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: VT1708B 8-Ch Analog [VT1708B 8-Ch Analog]
- Subdevices: 2/2
+ Subdevices: 1/1
Subdevice #0: subdevice #0
- Subdevice #1: subdevice #1
diff --git a/nikola/post.py b/nikola/post.py
index 810474b..91a8cc6 100644
--- a/nikola/post.py
+++ b/nikola/post.py
@@ -396,7 +396,13 @@ class Post(object):
document.make_links_absolute(base_url)
if self.hyphenate:
- hyphenate(document, lang)
+ # Allow per-post language selection through the 'lang' meta-data
diff --git a/nikola/post.py b/nikola/post.py
@@ -712,7 +718,7 @@ def insert_hyphens(node, hyphenator):
if not text:
continue
new_data = ' '.join([hyphenator.inserted(w, hyphen='\u00AD')
- for w in text.split(' ')])
+ for w in text.split()])
# Spaces are trimmed, we have to add them manually back
if text[0].isspace():
new_data = ' ' + new_data
@ramiro
ramiro / .vimrc
Created January 18, 2014 17:16
.vimrc fragment for Git/Hg commit message editing
if v:version >= 703
" Colums markers when writing Git/Hg commit messages
au BufRead hg-editor*,COMMIT_EDITMSG set tw=72 colorcolumn=51,+1
endif