create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>SoundCloud OAuth 2 User Agent Authentication Flow Demo</title> | |
<script type="text/javascript" charset="utf-8" src="javascript/jquery-1.4.2.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(function () { | |
var extractToken = function(hash) { |
/* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance | |
* with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
/* ============================================================= | |
* bootstrap-typeahead-backbone.js v2.0.0 | |
* http://twitter.github.com/bootstrap/javascript.html#typeahead | |
* https://github.com/twitter/bootstrap/blob/master/js/bootstrap-typeahead.js | |
* Modified by Marius Andreiana to work with Backbone Collection, Model, View | |
* - custom results formatting | |
* - custom behavior on selected item (Model with complex information) | |
* ============================================================= | |
* Copyright 2012 Twitter, Inc. | |
* |
def run_pg_fouine(): | |
info = host_info[env.host_string] | |
db_name = info.tags.get('Name') | |
sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 0/" /etc/postgresql/9.*/main/postgresql.conf') | |
sudo('/etc/init.d/postgresql reload') | |
time.sleep(30) | |
sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 500/" /etc/postgresql/9.*/main/postgresql.conf') | |
sudo('/etc/init.d/postgresql reload') | |
run('tail -n 100000 /var/log/postgresql/postgresql-9.*-main.log > /tmp/pgfouine.txt') | |
run('gzip -f /tmp/pgfouine.txt') |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
Simple example on how to make Twitter Bootstrap typeahead working with backbone collections. | |
Usage : | |
var bui = new Bootstrap.Typeahead({ | |
collection: ? | |
property: ? | |
items: ? | |
... | |
}); |
from ghost import Ghost | |
from PySide.QtGui import QApplication, QImage, QPainter, QPrinter | |
class MyGhost(Ghost): | |
def capture_pdf(self): | |
printer = QPrinter(QPrinter.HighResolution) | |
printer.setResolution(300) | |
printer.setOutputFileName("QtPrinter.pdf") | |
printer.setPaperSize(QPrinter.A4) |
#!/usr/bin/python | |
# | |
# List all files that have ever been committed in this repository, in any | |
# commit in any branch. | |
import pygit2 | |
import stat | |
def list_all_files(repo_path): | |
repo = pygit2.Repository(repo_path) |