- ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
- brew doctor
- brew update
import os, time, shutil, heapq | |
MAX_CACHE_MB = 200 | |
_CACHED_FILES = [] | |
_CACHED_SIZE = None # in bytes | |
def cache_file(filename): | |
''' | |
Automatically maintain a cached version of the given filename. |
These instructions will guide you through the process of setting up local, trusted websites on your own computer.
These instructions are intended to be used on Mac OSX Yosemite.
NOTE: You may substitute the edit
command for nano
, vim
, or whatever the editor of your choice is. Personally, I forward edit
to Sublime Text:
alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
<link rel="import" href="{{ STATIC_URL }}vendor/polymer/polymer.html"> | |
<link rel="import" href="{{ STATIC_URL }}vendor/core-ajax/core-ajax.html"> | |
<polymer-element name="django-ajax" extends="core-ajax"> | |
<script> | |
Polymer({ | |
ready: function() { | |
this.super(); | |
this.headers = { | |
"X-CSRFToken": {{ csrf_token }}, |
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import os | |
from boto.route53 import connect_to_region | |
from boto.route53.record import ResourceRecordSets | |
def apply(domain, ip, ttl, region, access_key=None, secret_key=None): | |
if access_key: | |
os.environ.setdefault('AWS_ACCESS_KEY_ID', access_key) |
# -*- coding: utf-8 -*- | |
""" | |
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic | |
Made available under GNU GENERAL PUBLIC LICENSE | |
# Modified Python I2C library for Raspberry Pi | |
# as found on http://www.recantha.co.uk/blog/?p=4849 | |
# Joined existing 'i2c_lib.py' and 'lcddriver.py' into a single library | |
# added bits and pieces from various sources | |
# By DenisFromHR (Denis Pleic) |
#!/usr/bin/python | |
# -*- coding: UTF-8 -*- | |
import serial, time, struct | |
ser = serial.Serial() | |
ser.port = "/dev/cu.wchusbserial1410" # Set this to your serial port | |
ser.baudrate = 9600 | |
ser.open() |
Run:
brew install gnupg gnupg2 pinentry-mac
git config --global user.signingkey <key>
git config --global commit.gpgsign true
git config --global gpg.program gpg
Followed by:
nano ~/.gnupg/gpg.conf
In response to this brief blog entry, @antirez tweeted for some documentation on high-performance techniques for Redis. What I present here are general high-performance computing (HPC) techniques. The examples are oriented to Redis. but they work well for any program designed to be single- or worker-threaded and asynchronous (e.g. uses epoll).
The motivation for using these techniques is to maximize performance of our system and services. By isolating work, controlling memory, and other tuning, you can achieve significant reduction in latency and increase in throughput.
My perspective comes from the microcosm of my own bare-metal (vs VM), on-premises deployment. It might not be suitable for all scenarios, especially cloud deployments, as I have little experience with HPC there. After some discussion, maybe this can be adapted as [redis.io documentation](https://redis.io/do
#include <string.h> | |
#include <dlfcn.h> | |
#include <err.h> | |
#include <errno.h> | |
#include <sys/mman.h> | |
#define LIB_PATH "libc.so.6" | |
template <class RET, class... ARGV> | |
class LibHook { |