(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
# This is an example of metaprogramming in the Elixir language. | |
# | |
# We will define a domain specific language (DSL) for the definition | |
# of a service which is watched by several sensors. | |
# Each sensor watches some property/functionality of the service and | |
# returns the result of the check. | |
# | |
# To determine if the service is functioning properly, we need functions | |
# to run all the sensors' code and gather the returned data. | |
# |
#!/bin/sh | |
# | |
# !!! IMPORTANT !!! | |
# As of 2017-12-14, pacaur is unmaintained (https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144) | |
# For alternatives see the arch wiki: https://wiki.archlinux.org/index.php/AUR_helpers#Active | |
# pacaur seems to get occasional updates to fix breaking changes due to pacman updates though. | |
# | |
# If you are new to arch, I encourage you to at least read and understand what | |
# this script does befor blindley running it. | |
# That's why I didn't make a one-liner out of it so you have an easier time |
Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).
The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
If you want a run-down of the 1.3 changes and the design decisions behidn those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8
To use the new phx.new
project generator, you can install the archive with the following command:
$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez
Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs
:
import type { HostConfig, Reconciler } from 'react-fiber-types'; | |
import type { ReactNodeList } from 'react-fiber-types/ReactTypes'; | |
import DOMPropertyOperations from './DOMPropertyOperations'; | |
import type { | |
Props, | |
Container, | |
Instance, | |
TextInstance, | |
OpaqueHandle, |
#!/bin/sh | |
# BSD 3-Clause License | |
# | |
# Copyright (c) 2017, Péter Szakszon | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# |
defmodule Benchmarker do | |
def run(title, module, function, size \\ 1024, iterations \\ 100) do | |
times = for (_ <- 1 .. iterations) do | |
data = :crypto.strong_rand_bytes(size) | |
{duration, _value} = :timer.tc fn -> | |
apply(module, function, [data]) | |
end | |
duration | |
end | |