- download and unzip stable RealtimePi distro
- write the extracted .img to sdcard with Etcher
#!/bin/bash | |
bold=$(tput bold) | |
normal=$(tput sgr0) | |
USAGE=$(cat <<-END | |
source ./issue_mfa.sh [AWS_USERNAME] [MFA_TOKEN] | |
Issues an aws security token and sets it automatically. | |
If added the -v flag it will echos AWS_SECRET_ACCESS_KEY, | |
AWS_ACCESS_KEY_ID, AWS_SECURITY_TOKEN, and AWS_SESSION_TOKEN |
FROM debian:10-slim | |
RUN apt-get update -y && \ | |
apt-get install -y awscli curl gnupg && \ | |
apt-key adv --fetch-keys "https://nginx.org/keys/nginx_signing.key" && \ | |
echo "deb http://nginx.org/packages/debian buster nginx" > /etc/apt/sources.list.d/nginx.list | |
RUN curl --silent --show-error --location --output /tmp/amazon-ssm-agent.deb "https://s3.us-east-1.amazonaws.com/amazon-ssm-us-east-1/latest/debian_amd64/amazon-ssm-agent.deb" && \ | |
dpkg -i /tmp/amazon-ssm-agent.deb |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: localstack | |
spec: | |
selector: | |
matchLabels: | |
app: localstack | |
replicas: 1 | |
template: |
name: Deploy package to GitHub package registry | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
jobs: | |
build: |
name: Build and publish Jekyll Docker image for Octocat Generator | |
on: [push] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: clean up, docker login && docker build && docker push |
#!/usr/bin/env node | |
// babel's cli option --copy-files will override the --ignore setting | |
// so copy resources like this | |
require('fs-extra').copy( | |
process.argv.slice(-2).shift(), | |
process.argv.slice(-2).pop(), | |
{ filter: (src,dist)=>{ return (src.match(/\.js|\.jsx|stories|test/)===null)} }, | |
err => { if (err) return console.error (err); console.log ('Copy success!'); |
import { Module } from '@nestjs/common'; | |
import { MyLibModule } from './my-lib.module'; | |
@Module({ | |
imports: [ | |
MyLibModule.register({ name: 'Enzo' }), | |
] | |
}) | |
export class ImportingModule {} |
#include <BLEDevice.h> | |
#include <BLEServer.h> | |
#include <BLEUtils.h> | |
#include <BLE2902.h> | |
uint8_t note = 38; | |
int SNARE[6] = {150, 4000, 38, 3, 0, 0}; //{threshold, sensitivity, note(no use), flag, velocity, last peakValue} | |
boolean snareFlag = false; | |
BLECharacteristic *pCharacteristic; |
app.use('/admin', function(req, res, next) { | |
/* GET 'http://www.example.com/admin/new' */ | |
console.log(req.originalUrl); // '/admin/new' | |
console.log(req.baseUrl); // '/admin' | |
console.log(req.path); // '/new' | |
next(); | |
}); |