I'm setting up a new Mac. I'm using this Gist to keep track of the software I install (roughly in order, in case it's useful later.
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 hashlib as hasher | |
import datetime as date | |
# Define what a Snakecoin block is | |
class Block: | |
def __init__(self, index, timestamp, data, previous_hash): | |
self.index = index | |
self.timestamp = timestamp | |
self.data = data | |
self.previous_hash = previous_hash |
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
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
tar xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
mv wkhtmltox/bin/wkhtmlto* /usr/bin/ | |
ln -nfs /usr/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf |
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
cd ~ | |
apt-get install libfontenc1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig -y | |
#https://github.com/wkhtmltopdf/wkhtmltopdf/releases | |
#replace arch | |
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb | |
dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb | |
apt --fix-broken install |
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 2015 Matthew Brush | |
Permission is hereby granted, free of charge, to any person obtaining a | |
copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: |
Wensheng Wang, 10/1/11
Source: http://blog.wensheng.org/2011/10/performance-of-flask-tornado-gevent-and.html
When choosing a web framework, I pretty much have eyes set on Tornado. But I heard good things about Flask and Gevent. So I tested the performance of each and combinations of the three. I chose something just a little more advanced than a "Hello World" program to write - one that use templates. Here are the codes:
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
$ redis-cli | |
> config set stop-writes-on-bgsave-error no |
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
class FilterMixin(object): | |
""" | |
View mixin which provides filtering for ListView. | |
""" | |
filter_url_kwarg = 'filter' | |
default_filter_param = None | |
def get_default_filter_param(self): | |
if self.default_filter_param is None: | |
raise ImproperlyConfigured( |
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
START LUKE=node(0) | |
CREATE | |
(HAN {name:"Han Solo"}), | |
(LEIA {name:"Princess Leia Organa"}), | |
(OBI_WAN {name:"Obi Wan Kenobi"}), | |
(YODA {name : "Yoda"}), | |
(TARKIN {name:"Grand Moff Tarkin"}), | |
(VADER {name:"Darth Vader"}), | |
(C3PO {name:"C3PO", droid:true}), |
NewerOlder