Skip to content

Instantly share code, notes, and snippets.

View santagada's full-sized avatar

Leonardo Santagada santagada

  • Guerrilla Games
  • Amsterdam
View GitHub Profile
| GET /2014/wp-content/themes/viradacultural/app/angular-google-maps.js HTTP/1.1 | 404 | http://viradacultural.prefeitura.sp.gov.br/2014/programacao/
|
| GET /2014/wp-content/themes/viradacultural/app/underscore-min.js HTTP/1.1 | 404 | http://viradacultural.prefeitura.sp.gov.br/2014/programacao/
|
| GET /apple-touch-icon-precomposed.png HTTP/1.1
PHP Notice: Undefined index: HTTP_HOST in /Users/santagada/projects/mapasculturais/src/protected/vendor/opauth/opauth/lib/Opauth/Opauth.php on line 48
PHP Stack trace:
PHP 1. {main}() /Users/santagada/projects/mapasculturais/src/protected/tools/doctrine:0
PHP 2. include() /Users/santagada/projects/mapasculturais/src/protected/tools/doctrine:4
PHP 3. require() /Users/santagada/projects/mapasculturais/src/protected/tools/doctrine.php:31
PHP 4. require() /Users/santagada/projects/mapasculturais/src/protected/tools/cli-config.php:2
PHP 5. MapasCulturais\App->init() /Users/santagada/projects/mapasculturais/src/protected/application/bootstrap.php:17
PHP 6. MapasCulturais\AuthProvider->__construct() /Users/santagada/projects/mapasculturais/src/protected/application/lib/MapasCulturais/App.php:304
PHP 7. MapasCulturais\AuthProviders\OpauthOpenId->_init() /Users/santagada/projects/mapasculturais/src/protected/application/lib/MapasCulturais/AuthProvider.php:17
PHP 8. Opauth->__construct() /Users/santaga
"""
Exports Issues from a specified repository to a CSV file
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
"""
import csv
import requests
explain SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
FROM wp_posts
WHERE wp_posts.post_type = 'post'
AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private')
ORDER BY wp_posts.post_date DESC
LIMIT 0, 15
+------+-------------+----------+-------+---------------------------+------------------+---------+------+--------+------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
@santagada
santagada / gist:b08c950b121c9f0409f8
Last active August 29, 2015 14:13
where are my tmp_disk_tables
mysql> show global status like '%tmp%';
+-------------------------+-----------+
| Variable_name | Value |
+-------------------------+-----------+
| Created_tmp_disk_tables | 146954844 |
| Created_tmp_files | 812363 |
| Created_tmp_tables | 220784074 |
+-------------------------+-----------+
mysql> show variables like '%tmp%';
<?php
class FakePost {
public function __construct($ID, $post_parent) {
$this->ID = $ID;
$this->post_parent = $post_parent;
}
}
py-setproctitle master $ python setup.py develop
running develop
running egg_info
writing top-level names to setproctitle.egg-info/top_level.txt
writing dependency_links to setproctitle.egg-info/dependency_links.txt
writing setproctitle.egg-info/PKG-INFO
Traceback (most recent call last):
File "setup.py", line 105, in <module>
**kwargs)
File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py", line 148, in setup
import threading
import time
import sys
import os
TIMEOUT = 1.0
def GetPhoto():
time.sleep(5)
@santagada
santagada / prompt.xsh
Last active October 31, 2016 09:59
simple powerline for xonsh
import os
from collections import namedtuple
Section = namedtuple('Section', ['line', 'fg', 'bg'])
PARTS = 3
def cwd_sec():
cwd = $PWD
if cwd.startswith($HOME):
from collections import defaultdict
import nsq
import msgpack
from time import strftime
from colorama import init, Fore, Style
init()
def wraphand(topic):
def handler(message):
def dec(key):