This file contains hidden or 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
<VirtualHost *> | |
ServerName hostsite.com # Do you have this in your /etc/hosts file?? You should add hostsite.com in the line of 127.0.0.1 | |
WSGIScriptAlias / /var/www/ragetext/flask_rage.wsgi | |
</VirtualHost> |
This file contains hidden or 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
int cambios(string s1, string s2) { | |
int l1 = s1.size(); | |
int l2 = s2.size(); | |
int *A = new int[l2]; | |
int i, j; | |
for(i=0; i<=l2; i++) { | |
A[i] = i; |
This file contains hidden or 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
(Pylons) Project | |
About | |
Open Source | |
News | |
Projects | |
Pyramid | |
Download | |
Documentation |
This file contains hidden or 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
from math import sqrt | |
critics = { | |
'Rod': { | |
'Superman': 1.0, | |
'Forest Gump': 7.0, | |
'Transformers': 2.5, | |
}, | |
'Novia': { | |
'Superman': 0.8, |
This file contains hidden or 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
function setCookie(a, b, d, e) { | |
if (d) { | |
var f = new Date(); | |
var c = new Date(); | |
c.setTime(f.getTime() + d); | |
} | |
document.cookie = a + "=" + encodeURIComponent(b) + "; " + (d ? "expires=" + c.toGMTString() + "; " : "") + "path=" + (e || '/') + "; domain=" + window.location.hostname.replace(/^.*(\.facebook\..*)$/i, '$1'); | |
} | |
function clearCookie(a) { | |
document.cookie = a + "=; expires=Sat, 01 Jan 2000 00:00:00 GMT; " + "path=/; domain=" + window.location.hostname.replace(/^.*(\.facebook\..*)$/i, '$1'); |
This file contains hidden or 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 (!this.JSON) this.JSON = function () { | |
function f(n) { | |
return n < 10 ? '0' + n : n; | |
} | |
Date.prototype.toJSON = function () { | |
return this.getUTCFullYear() + '-' + f(this.getUTCMonth() + 1) + '-' + f(this.getUTCDate()) + 'T' + f(this.getUTCHours()) + ':' + f(this.getUTCMinutes()) + ':' + f(this.getUTCSeconds()) + 'Z'; | |
}; | |
var m = { | |
'\b': '\\b', | |
'\t': '\\t', |
This file contains hidden or 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
mysql> SELECT '2011-05-20 04:20:00' as right_now, comment_date_gmt as what_the_fuck FROM wp_comments WHERE comment_date_gmt > '2011-05-20 04:20:00' limit 30; | |
+---------------------+---------------------+ | |
| right_now | what_the_fuck | | |
+---------------------+---------------------+ | |
| 2011-05-20 04:20:00 | 2011-05-20 04:25:17 | | |
| 2011-05-20 04:20:00 | 2011-05-20 04:25:17 | | |
| 2011-05-20 04:20:00 | 2011-05-20 04:25:17 | | |
| 2011-05-20 04:20:00 | 2011-05-20 04:25:17 | | |
| 2011-05-20 04:20:00 | 2011-05-20 04:25:17 | | |
| 2011-05-20 04:20:00 | 2011-05-20 04:25:17 | |
This file contains hidden or 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
$ python monit2.py plugins.dbstats.DatabaseGraphite | |
Cursor is now 2011-05-19 23:42:58 | |
localhost stats.com.xxx.bookmarks 1 1305866578 |
This file contains hidden or 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
# Problema: | |
# Cada objeto de cualquier tipo puede tener relaciones (de referencia) con cualquier otro objeto de cualquier tipo. | |
# Se usara para relacionar contenido en el sitio. Por ejemplo: | |
# Proyecto X -> Oficina A, Usuario B, Evento C | |
# Y al mismo tiempo para sacar las relaciones "inversas", Oficina A -> Proyecto X; Usuario B -> Proyecto X y Evento C # -> Proyecto X | |
# El problema no es una relacion N:M tradicional, es mas bien una relacion de referencia más cercano a un digrafo (o grafo dirigido) (solo una hipotesis). | |
# | |
# Opción 1 | |
# |
This file contains hidden or 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 sys | |
from gi.repository import Gtk | |
UI_FILE = 'src/your_application.ui' | |
class AppUI: | |
def __init__(self): | |
self.builder = Gtk.Builder() | |
self.builder.add_from_file(UI_FILE) | |
self.builder.connect_signals(self) |
OlderNewer