Put flip somewhere in your $PATH and chmod a+x it.
Copy fuck into ~/.bashrc.
| /* | |
| * Copyright 2014 Chris Banes | |
| * | |
| * Licensed 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 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| # Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org) | |
| # The author disclaims copyright to this source code. | |
| import sys | |
| import struct | |
| import socket | |
| import time | |
| import select | |
| import re | |
| import codecs |
| def one(iterable): | |
| """Return the object in the given iterable that evaluates to True. | |
| If the given iterable has more than one object that evaluates to True, | |
| or if there is no object that fulfills such condition, return False. | |
| >>> one((True, False, False)) | |
| True | |
| >>> one((True, False, True)) | |
| False |
| class Monad: | |
| @staticmethod | |
| def unit(val): | |
| raise NotImplemented | |
| def bind(self, fn): | |
| raise NotImplemented | |
| def map(self, map_fn): | |
| """ |
| # python (flask) side: | |
| import time | |
| from flask import Response | |
| app = Flask(__name__) | |
| @app.route('/event_stream') | |
| def stream(): | |
| def event_stream(): |
| from collections import defaultdict | |
| import concurrent.futures | |
| class TasksGroup(object): | |
| """A group of tasks with dependencies. | |
| >>> tasks = TasksGroup() | |
| >>> @tasks.add() |
| def get_video_info(path): | |
| """Uses ffmpeg to determine information about a video. This has not been broadly | |
| tested and your milage may vary""" | |
| from decimal import Decimal | |
| import subprocess | |
| import re | |
| process = subprocess.Popen(['/usr/bin/ffmpeg', '-i', path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | |
| stdout, stderr = process.communicate() |
Ubuntu's analog of robcowie / postgis_timezone_db.markdown
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:ubuntugis/ppa
sudo apt-get update
sudo apt-get install postgresql-9.1-postgis
| #!/bin/bash | |
| # | |
| # Integrate our branch into origin/develop | |
| # | |
| # It's a shortcut for : | |
| # | |
| # 1. pull for last changes on develop | |
| # 2. rebase the target branch against develop | |
| # 3. recheck if no changes happen in the meanwhile | |
| # 4. merge --no-ff |