This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
# Instructions for fresh install | |
$ sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon | |
# reboot | |
$ source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh | |
$ echo 'export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH' | tee -a ~/.zshrc | |
$ echo 'source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh' | tee -a ~/.zshrc | |
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable | |
$ nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin | |
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager |
This gist lists challenges you run into when building offline-first applications based on IndexedDB, including open-source libraries like Firebase, pouchdb and AWS amplify (more).
Note that some of the following issues affect only Safari. Out of the major browsers, Chrome's IndexedDB implementation is the best.
When this bug occurs, every time you use the indexeddb, the WAL file grows. Garbage collection doesn't seem to be working, so after a while, you end up with gigabytes of data.
with import <nixpkgs> {}; | |
let | |
my-python-packages = python-packages: with python-packages; [ | |
pip | |
setuptools | |
]; | |
python-with-my-packages = pkgs.python3.withPackages my-python-packages; | |
# define packages to install with special handling for OSX |
Rank | Type | Prefix/Suffix | Length | |
---|---|---|---|---|
1 | Prefix | my+ | 2 | |
2 | Suffix | +online | 6 | |
3 | Prefix | the+ | 3 | |
4 | Suffix | +web | 3 | |
5 | Suffix | +media | 5 | |
6 | Prefix | web+ | 3 | |
7 | Suffix | +world | 5 | |
8 | Suffix | +net | 3 | |
9 | Prefix | go+ | 2 |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>MOBA-Time</title> | |
<style> | |
* { | |
cursor: none !important; | |
pointer-events: none !important; |
set -l data_status (curl -s https://iceportal.de/api1/rs/status) | |
set -l data_trip (curl -s https://iceportal.de/api1/rs/tripInfo/trip) | |
# next stop | |
echo (echo $data_trip | jq -r '([ .trip.stops[] | select(.info.passed==false) ] | |
| first).station.name') | |
# train number | |
echo (echo $data_trip | jq -r '"\(.trip.trainType)-\(.trip.vzn)"') | |
# speed | |
echo speed (echo $data_status | jq -r '"\(.speed) km/h"') |
import json | |
import requests | |
from urllib.parse import urlparse, parse_qs | |
headers = { | |
'User-Agent': 'MeinMagenta/7.24 CFNetwork/1107.1 Darwin/19.0.0', | |
'Host': 'example.de', #sic! server does not look at Host header as it seems | |
} | |
params = ( |
mobility inside is a new app, built by mobimeo, currently in its beta phase, that wants to solve the hassle of booking tickets for german public transport. the app - other than its competitors - is build on a relatively nice api that enables booking tickets even without using the app itself.
this is an unofficatial documentation for this api. feedback and improvements welcome.
tenant | URL |
---|---|
DING | https://ding-mi.mobimeo.io |
AVG | https://avg-mi.mobimeo.io |
MVG | https://mvg-mi.mobimeo.io |
A compile-time 4-Bit Virtual Machine implemented in TypeScript's type system. Capable of running a sample 'FizzBuzz' program.
Syntax emits zero JavaScript.
type RESULT = VM<
[
["push", N_1], // 1
["push", False], // 2
["peek", _], // 3