Skip to content

Instantly share code, notes, and snippets.

View colinbut's full-sized avatar
🎯
Focusing

Colin But colinbut

🎯
Focusing
View GitHub Profile
@cb372
cb372 / cross-account-peering-role.yml
Last active June 10, 2020 15:04
CloudFormation for setting up a VPC
AWSTemplateFormatVersion: 2010-09-09
Description: >
Creates a cross-account role that your AWS account can assume
in order to accept a VPC peering connection in the other account.
This is pretty confusing, so to clarify,
1. Run this CloudFormation in the OTHER account to create the cross-account role.
2. Your account requests a peering connection with the other account.
3. Your account assumes the role in order to access the other account
and accept the peering connection.
Parameters:

The PATH is an important concept when working on the command line. It's a list of directories that tell your operating system where to look for programs, so that you can just write script instead of /home/me/bin/script or C:\Users\Me\bin\script. But different operating systems have different ways to add a new directory to it:

Windows

  1. The first step depends which version of Windows you're using:
  • If you're using Windows 8 or 10, press the Windows key, then search for and
@lukebriscoe
lukebriscoe / OVO Post-mortem template.md
Last active June 10, 2020 10:47
OVO's post-mortem template

Post-mortem title


Incident date:

Postmortem date:

Attendees
@nikhita
nikhita / update-golang.md
Last active April 27, 2024 13:09
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

@leonardofed
leonardofed / README.md
Last active May 3, 2024 01:24
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@colinbut
colinbut / Java8Snippet.java
Created August 18, 2015 20:19
Some Java 8 features - Lambdas, Streams, Method References
public class Java8Snippet {
public static void main(String[] args) {
List<String> names = Arrays.asList(new String[]{"Bobby", "Alice", "Emma", "Amy", "Anton"});
names.stream()
.sorted()
.filter(s -> s.startsWith("A")
.forEach(System.out::println());
}
}
@aweijnitz
aweijnitz / Vagrantfile
Last active March 25, 2024 13:54
This is a Vagrant file and a provisioning script to create a Debian-based Jenkins server, including Java, Ant and Tomcat. Also see "provision.sh" below
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Every Vagrant virtual environment requires a box to build off of.
# Named boxes, like this one, don't need a URL, since the are looked up
@eric2323223
eric2323223 / applicationContext.xml
Created September 4, 2012 02:11
Sample spring embedded database configuration
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
">
@ehuynh
ehuynh / gist:2572398
Created May 1, 2012 23:37
Start and Stop Jenkins on OSX
# start
sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
# stop
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist