As of January 2017, Raspbian does not yet include the latest Python release, Python 3.6. This means we will have to build it ourselves, and here is how to do it.
- Install the required build-tools (some might already be installed on your system).
# Usage: ./dns_check.py <list_of_domain_names.txt> | |
import dns.resolver | |
import requests | |
import re | |
import json | |
import sys | |
resolver = dns.resolver.Resolver() | |
resolver.timeout = 5 | |
resolver.lifetime = 5 |
import jester, asyncdispatch, os, osproc, strutils, json, threadpool, asyncfile | |
proc respondOnReady(fv: FlowVar[TaintedString], resp: Response) {.async.} = | |
while true: | |
if fv.isReady: | |
echo ^fv | |
var errorsFile = openAsync("tmp/errors.txt", fmReadWrite) | |
var logFile = openAsync("tmp/logfile.txt", fmReadWrite) | |
var errors = await errorsFile.readAll() |
I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6
apt-get update && apt-get install gdb
As of January 2018, Raspbian does not yet include the latest Python release, Python 3.6. This means we will have to build it ourselves, and here is how to do it. There is also an ansible role attached that automates it all for you.
#!/boot/bzImage | |
# Linux kernel userspace initialization code, translated to bash | |
# (Minus floppy disk handling, because seriously, it's 2017.) | |
# Not 100% accurate, but gives you a good idea of how kernel init works | |
# GPLv2, Copyright 2017 Hector Martin <[email protected]> | |
# Based on Linux 4.10-rc2. | |
# Note: pretend chroot is a builtin and affects the current process | |
# Note: kernel actually uses major/minor device numbers instead of device name |
import { h, cloneElement, Component } from 'preact'; | |
/** Example <Fetch url="/foo.json" /> compositional component. | |
* Just to demonstrate a compositional component that requires input massaging. | |
*/ | |
class Fetch extends Component { | |
state = { loading: true }; | |
componentDidMount() { | |
this.update(); |
--- | |
- name: Install MacOS Packages | |
hosts: localhost | |
become: false | |
vars: | |
brew_cask_packages: | |
- atom | |
- docker | |
- dropbox | |
- firefox |
Copy all the files to the build directory. | |
Copy icudtl.dat to the build directory. (you can find it in the vscode downloads ex for linux). | |
chromium version in port is 52.0.2743.116. | |
This was built with FreeBSD 11.0-RELEASE-p1. If building with other versions probably need to change | |
the freebsd versions in diff files (ex. freebsd11 => freebsd10) | |
Installed | |
node => v6.9.1 | |
npm => 3.9.2 | |
>chmod 755 vscode_build.sh |
TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl
extension and a different #!
call.
The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect
we use the following:
#!/usr/bin/expect