Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
import machine | |
import pixels | |
import array | |
import urandom | |
import time | |
# Source: | |
# https://github.com/FastLED/FastLED/blob/master/examples/Fire2012WithPalette/Fire2012WithPalette.ino | |
heatColors = array.array('L', [0x000000, |
# If Homebrew is not installed uncomment the next line | |
# /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Install Wine and WineTricks | |
brew install wine && brew install winetricks | |
# Download CircuitMaker | |
curl https://s3.amazonaws.com/altium-install/CircuitMaker/CircuitMakerSetup.exe -o ~/Downloads/CircuitMakerSetup.exe |
f=open("random.py","w") | |
f.write('''import os | |
def getrandbits(k): | |
numbytes = (k + 7) // 8 | |
x = int.from_bytes(os.urandom(numbytes), 'big') | |
return x >> (numbytes * 8 - k) | |
def bit_length(n): | |
res = n |
# build with | |
# docker build -f Dockerfile.buildozer -t buildozer . | |
# use the produced image with | |
# docker run -v your_project_dir:/root/build buildozer | |
# at the end of the run, the build directory in your project should contain the apk | |
# you can use the /root/.buildozer/ volume to cache your distributions (first usage may be longer) | |
FROM ubuntu:latest | |
RUN dpkg --add-architecture i386 &&\ |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
The code will get better. Linus' Law: "given enough eyeballs, all bugs are shallow": we'll be able to get community contributions and bug reports, and thus the code will grow better faster than we can grow it ourselves. Also, Joy's Law - "No matter who you are, most of the smartest people work for someone else": we'll get better code from people who don't work for us than from people who do.
We'll write better code. Wall's 3rd great virtual of a programmer, Hubris: we'll write better code people we don't want other people to say bad things about us. We'll do better with the world watching than with just us.
Increased ability to hire. We're a 19k circ newspaper in a town most people have never heard of. Open source will help put us on the map, make us a place people actually might be interested in working.
When we do hire, we'll be able to hire pe
""" | |
The following mixins and views are borrowed and adapted from the following | |
gist: | |
https://gist.github.com/michelts/1029336 | |
""" | |
from functools import partial | |
from django.views.generic.base import TemplateResponseMixin | |
from django.views.generic.edit import ProcessFormView, FormMixin |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
{% load handlebars i18n %} | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Example</title> | |
</head> | |
<body> | |
{% filter handlebars %} | |
<script type="text/x-handlebars"> | |
{$ #view App.MenuView $} |
# -*- coding: utf-8 -*- | |
from django.contrib.auth.decorators import login_required | |
from django.utils.cache import patch_response_headers | |
from django.utils.decorators import method_decorator | |
from django.views.decorators.cache import cache_page, never_cache | |
from django.views.decorators.csrf import csrf_exempt | |
class NeverCacheMixin(object): | |
@method_decorator(never_cache) |