Skip to content

Instantly share code, notes, and snippets.

peterforgacs /
Last active May 24, 2022
Running Windows 10 on AWS EC2

Running Windows 10 on AWS EC2

Downloading the image

Download the windows image you want.

AWS vmimport supported versions: Microsoft Windows 10 (Professional, Enterprise, Education) (US English) (64-bit only)

So Home wont work.

geerlingguy /
Last active Apr 21, 2022
Ansible Role Test Shim Script
# Ansible role test shim.
# Usage: [OPTIONS] ./tests/
# - distro: a supported Docker distro version (default = "centos7")
# - playbook: a playbook in the tests directory (default = "test.yml")
# - role_dir: the directory where the role exists (default = $PWD)
# - cleanup: whether to remove the Docker container (default = true)
# - container_id: the --name to set for the container (default = timestamp)
Saissaken / Update git fork with
Last active May 14, 2022
Update git fork with tags
View Update git fork with
# Repo: someuser/myframework
# Fork: superteam/myframework
# Track:
git clone
cd myframework
git remote add upstream
# Update:
git fetch upstream
espaciomore /
Last active Apr 5, 2022
Watch command for Git Bash
while(true); do
echo -e "${OUTPUT[@]}"
ebraminio / upload.go
Last active Mar 15, 2022
golang upload client and server
View upload.go
// curl -X POST -H "Content-Type: application/octet-stream" --data-binary '@filename'
package main
import (
diegopacheco /
Last active May 23, 2022
How to install cqlsh only on Linux?
pip3 install cqlsh==4.1.1
cqlsh --version
# or...
sudo su root
pip install cqlsh==4.1.1
cqlsh --version

How to setup AWS lambda function to talk to the internet and VPC

I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.

So it might be really unintuitive at first but lambda functions have three states.

  1. No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
  2. VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
  3. VPC with NAT, The best of both worlds, AWS services and web.

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

andrewmilson / file-upload-multipart.go
Last active May 24, 2022
Golang multipart/form-data File Upload
View file-upload-multipart.go
package main
import (
docwhat / example1
Created Dec 7, 2015
choco install dotnet3.5 fails (but succeeds?)
View example1
PS C:\Users\Administrator> choco install dotnet3.5 -debug -yes
Chocolatey is running on Windows v 6.3.9600.0
Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
Command line: "C:\ProgramData\chocolatey\choco.exe" install dotnet3.5 -debug -yes
Received arguments: install dotnet3.5 -debug -yes
NOTE: Hiding sensitive configuration data! Please double and triple
check to be sure no sensitive data is shown, especially if copying
output to a gist for review.