This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MYCOLOR1="\[\033[1;32m\]" | |
MYCOLOR2="\[\033[1;34m\]" | |
MYCOLOR3="\[\033[1;37m\]" | |
MYCOLOR4="\[\033[1;32m\]" | |
export PS1="$MYCOLOR1\u$MYCOLOR2|$MYCOLOR3\h $MYCOLOR2\w $MYCOLOR4> \[\033[00m\]" | |
esto en /root/.bashrc: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from django.utils.translation import ugettext_lazy as _ | |
from django.conf import settings as django_settings | |
class SettingsProxy(object): | |
def __init__(self, settings, defaults): | |
self.settings = settings | |
self.defaults = defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import os | |
from logbook import Logger, TimedRotatingFileHandler | |
from logbook.queues import ThreadedWrapperHandler | |
from django.conf import settings | |
from django.core.serializers.json import simplejson | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if paginator.count %} | |
<div class="pagination clearfix"> | |
<span class="results-count">{{ paginator.count }} {% trans 'results' %}</span> | |
<span class="paginator"> | |
{% if page.has_previous %} | |
<a title="previous page" class="prev awesome medium button" | |
href="?{{ search_qs }}&page={{ page.previous_page_number }}&{{ form.previous_facets_encoded }}"> | |
| |
</a> | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/sbin/runscript | |
# Copyright 1999-2005 Gentoo Foundation | |
# Distributed under the terms of the GNU General Public License v2 | |
opts="${opts} " | |
pidfile="/var/run/supervisord/supervisord.pid" | |
fromcron="0" | |
# this next comment is important, don't remove it - it has to be somewhere in | |
# the init script to kill off a warning that doesn't apply to us |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import tweepy | |
>>> auth = tweepy.BasicAuthHandler("matagus", "blablabla") | |
>>> api = tweepy.API(auth) | |
>>> user = tweepy.api.get_user('twitter') | |
>>> user | |
<tweepy.models.User object at 0xb767b88c> | |
>>> user.id_str | |
u'783214' | |
>>> user = tweepy.api.get_user('matagus') | |
>>> user.id_str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data = (function () { | |
var _data = []; | |
$("#<TABLE-ID-REPLACE-ME> tbody td").each( | |
function () { | |
var rowIndex = this.parentNode.rowIndex -1, | |
cellValue = this.innerHTML.trim(); | |
if (_data[rowIndex]) { | |
_data[rowIndex].push(cellValue); | |
} else { | |
_data[rowIndex] = [cellValue]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Copyright (c) 2009, Sean Creeley | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without modification, | |
are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright notice, this | |
list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright notice, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- this a single line comment | |
-- | |
{- and this | |
- is a multiline | |
- comment | |
- in haskell code -} | |
a = "my string" | |
b = ['m', 'y', 's', 't', 'i', 'n', 'g'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<hen:logs xmlns:hen="http://www.site.de/schemas/logs/1.0"> | |
<!--<hen:vhost> | |
<hen:uuid></hen:uuid> | |
</hen:vhost>--> | |
<hen:vhost>www.site1.de | |
<hen:uuid>c5328180-e52b-4af5-bf6e-7a9e7c1754e2</hen:uuid> | |
</hen:vhost> | |
<hen:vhost>www.site2.de | |
<hen:uuid>b7b968db-27c7-4430-8346-b2c6e2de8065</hen:uuid> |