Skip to content

Instantly share code, notes, and snippets.

View seajoshc's full-sized avatar
💾

Josh Campbell seajoshc

💾
View GitHub Profile
@seajoshc
seajoshc / json-golang.md
Last active December 13, 2023 05:24
The Ultimate Guide to JSON in Go [MIRROR]
title author date categories images
The Ultimate Guide to JSON in Go
Lane Wagner
2021-04-28
golang
/img/800/json_data.webp
@wolftales
wolftales / ansible cheat sheet
Last active January 14, 2024 18:15 — forked from githubfoam/ansible cheat sheet
ansible cheat sheet
----------------------------------------------------------------------------------------------------------------------
# Not inventory, remote passwordless ssh connection
[clients]
control01 ansible_host=192.168.45.10 ansible_connection=ssh ansible_ssh_port=22 ansible_ssh_private_key_file=/home/vagrant/.ssh/id_rsa ansible_user=vagrant
#vagrant-client01 ansible_host=10.10.40.94 ansible_ssh_private_key_file='.vagrant/machines/vagrant-client01/virtualbox/private_key' ansible_connection=local ansible_ssh_user='vagrant'
[all:vars]
ansible_python_interpreter=/usr/bin/python3
----------------------------------------------------------------------------------------------------------------------
# Running a playbook in dry-run mode
@ww9
ww9 / gist_blog.md
Last active January 12, 2024 23:00
Using Gist as a blog #blog

Blogging with Gist

Gist simplicity can turn blogging into a liberating experience.

Pros Cons
✅ Free, simple, fast, hassle-free ❌ Image upload in comments only
✅ Tagging ❌ No post pinning
✅ Search ❌ Doesn't look like a blog
✅ Revisions ❌ Unfriendly URLs
@enricofoltran
enricofoltran / main.go
Last active June 26, 2024 12:16
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active March 9, 2024 07:54
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@okapies
okapies / t470s.md
Last active October 28, 2021 16:45
Ubuntu 16.04 on ThinkPad T470s

This is a document describing how to install Ubuntu 16.04 LTS on ThinkPad T470s.

My Hardware

  • CPU: Intel Core i7-7600U (2.80GHz, 4MB cache)
  • Graphics: Intel HD Graphics 620
  • Display: 14” WQHD (2560 X 1440) IPS Non-Touch Anti-Glare
  • Memory: 24GB DDR4 2133 MHz (8GB Onboard + 16GB)
  • SSD: PCIe-NVMe 256G OPAL 2.0
  • Wireless: Intel Dual Band Wireless AC (2x2) 8265 Bluetooth 4.1
  • Fingerprint Reader
@mdang
mdang / RAILS_CHEATSHEET.md
Last active June 26, 2024 00:37
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before

@ryan0x44
ryan0x44 / Terraform-Blue-Green-AWS.md
Created November 19, 2015 21:57
Blue-Green AWS Auto Scaling Deployments with Terraform

A quick note on how I'm currently handling Blue/Green or A/B deployments with Terraform and AWS EC2 Auto Scaling.

In my particular use case, I want to be able to inspect an AMI deployment manually before disabling the previous deployment.

Hopefully someone finds this useful, and if you have and feedback please leave a comment or email me.

Overview

I build my AMI's using Packer and Ansible.

@seajoshc
seajoshc / remote_rails_console_cap2
Created April 24, 2015 14:45
Remote Rails Console cap 2 task
namespace :rails do
desc 'Remote rails console'
task :console, roles: :app do
run_interactively "rails console #{rails_env}"
end
desc 'Remote dbconsole'
task :dbconsole, roles: :app do
run_interactively "rails dbconsole #{rails_env}"
end