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:
Description: CloudFront Functions Demo | |
# This example shows how to use CloudFront, CloudFront Functions, and CloudFormation. | |
# In this simple example we setup CloudFront so that on any request we redirect to another site. | |
# While basic, this example can be expanded to provide typical redirect scenarios, based | |
# on the event passed to the function. | |
# This example written by Mike Roberts (https://twitter.com/mikebroberts), Symphonia. | |
# For more ideas about using AWS more effectively,see our blog at https://blog.symphonia.io/ |
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:
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
There are circumstances where one wants to attach the local machine to the same layer 2 ethernet segment, which a remote machine is connected to, with the only available transport being SSH.
While this solution has quite some shortcomings and should not be used to replace a real VPN, it can be beneficial e.g. for debugging network issues remotely.
#! /bin/bash | |
d="$(mktemp -d)" | |
# Make a git repo with one file in it. | |
mkdir "$d/good" | |
cd "$d/good" | |
git init | |
echo good > file.txt | |
git add -A |
My Elasticsearch cheatsheet with example usage via rest api (still a work-in-progress)
Random query recipes of JMESPath for the AWS CLI tools that I might have written or stumbled upon.
pipeline { | |
agent any | |
stages { | |
stage('Build') { | |
steps { | |
sh 'docker build -t openjobs:latest .' | |
sh 'docker-compose build' | |
sh 'docker-compose run web bundle install' | |
sh 'docker-compose run web yarn' | |
sh 'docker-compose run -e RAILS_ENV=test --rm web bundle exec rake db:drop db:create db:migrate' |
'use strict'; | |
// Dependencies | |
const gcloud = require('google-cloud', { | |
projectId: 'sara-bigquery', | |
keyfileName: 'keyfile.json' | |
}); | |
const vision = gcloud.vision(); | |
const fs = require('fs'); | |
const async = require('async'); |