Instead of running cmake in tree such as:
cd ${WORKSPACE}
git clone http://github.com/WebAssembly/wabt
cd wabt
mkdir build
cd build
cmake ..
cmake --build .
| #!/bin/bash -eu | |
| function linalg_matrix_dump { | |
| local -n M=${1} | |
| local -a data=(${M[data]}) | |
| typeset -i rows=${M[rows]} | |
| typeset -i cols=${M[cols]} | |
| typeset -i i j | |
| printf "%s:\n" ${1} | |
| for ((i=0;i<rows;i++)) ; do |
| #!/usr/bin/env python3 | |
| import json | |
| import requests | |
| import argparse | |
| import os | |
| import sys | |
| from git import Repo | |
| ## |
| mod LinkedList { | |
| type Link<T> = Option<Box<Node<T>>>; | |
| struct Node<T> { | |
| value: T, | |
| next: Link<T>, | |
| } | |
| } | |
| mod DoubleLinkedList { | |
| use core::cell::RefCell; |
Instead of running cmake in tree such as:
cd ${WORKSPACE}
git clone http://github.com/WebAssembly/wabt
cd wabt
mkdir build
cd build
cmake ..
cmake --build .
| #!/bin/bash -ex | |
| # This script creates a Salt installation inside a virtual environment so that | |
| # a steteful infrastructure aiming customer A is absolutely oblivious of customer B. | |
| # | |
| # No changes are required on configuration files, so that you can be sure that | |
| # whatever you keep in the source control is valid in production. All you have to do | |
| # in production is copying the trees /etc/salt and /srv/salt from the source control | |
| # to their glorified places /etc/salt and /srv/salt in production. | |
| # |
| def contents(ssh, files): | |
| for file in files: | |
| path = '{}/{}'.format(ssh, file) | |
| yield open(path).read().replace("\n", "") | |
| def keysFor(args): | |
| ssh = '{}/.ssh'.format(os.environ['HOME']) | |
| extensions = [ '.pub' ] | |
| files = [f for f in os.listdir(ssh) if os.path.splitext(f)[1] in extensions] | |
| keys = [k for k in contents(ssh, files) if k.split(' ')[2] in args] |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| ## | |
| ## This script is instended to install RetroPie on a newly installed Debian Buster box. | |
| ## | |
| ## Hardware requirements: | |
| ## This script is known to work well with UDOO Bolt V8, which has an AMD Ryzen 1000 SoC. | |
| ## | |
| ## Software Requirements: | |
| ## |
| #!/bin/bash | |
| // one-liner which converts YAML to JSON | |
| function yaml2json { | |
| python -c 'import sys, yaml, json; y=yaml.load(sys.stdin.read()); print(json.dumps(y))' | |
| } | |
| function kubectl_clusters { | |
| cat ~/.kube/config | yaml2json | jq '.clusters[].name' | sed 's/"//g' | |
| } |
| //---------------------------------------------------------------------------------------------------------------------- | |
| // This is an example of how more than 22 fields could be mapped with Slick 3.3.1 (other versions may work as well?). | |
| // | |
| // The general idea is pretty simple: | |
| // 1. define a case class made of nested case classes. | |
| // 2. define a projection made of nested projections. | |
| // | |
| // In addition, you can just get rid of noisy usages of ``GetResult`` generated by the Slick Code Generator. | |
| // Just get rid of that, since usage of ``mapTo[T]`` makes definition of projections clean and hygienic. | |
| //---------------------------------------------------------------------------------------------------------------------- |