(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd > | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>org.nodered.plist</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/node</string> | |
<string>/usr/local/bin/node-red</string> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
import Adafruit_BBIO.PWM as PWM | |
servo_pin = "P8_13" | |
duty_min = 2.5 | |
duty_max = 13.1 | |
duty_span = duty_max - duty_min | |
PWM.start(servo_pin, duty_span * 0.5, 60.0) | |
while True: |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
<?php | |
//add your server aliases here | |
$servers = array( | |
"185.14.184.234" => "mcfly.bensmann.no", | |
"185.14.184.xxx" => "another.server.com", | |
); | |
//this script is triggered by this command from the terminal or cron: | |
//echo "time=`uptime`&df=`df -h`" | curl -s -d @- http://domain.com/path/to/script.php |
#!/usr/bin/python | |
import boto | |
import math | |
# Use boto to Copy an Object greater than 5 GB Using S3 Multipart Upload API | |
# probably could be made more pythonesque, based directly off the AWS Java example | |
# Copy an Object [greater than 5 GB] Using the AWS SDK for Java [S3] Multipart Upload API | |
# http://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingLLJavaMPUapi.html | |
# copy in same bucket as a simple test |
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
class SomeForm(forms.Form): | |
name = forms.CharField(max_length=200) | |
def __init__(self, *args, **kwargs): | |
super(SomeForm, self).__init__(*args, **kwargs) | |
self.fields["name"].max_length = 300 | |
""" | |
This fabric script automates the creation of a virtual environment and a Django | |
project. The result will be virtual environtment with the name of the project. | |
The folder namer where the project code will be placed is specified in | |
SOURCE_DIRECTORY_NAME, a static root folder will be created and settings.py | |
will be updated. | |
""" | |
try: | |
from fabric.api import env, run, local | |
from fabric.context_managers import lcd, prefix |