Skip to content

Instantly share code, notes, and snippets.

Install Fedora

Create partitions for LVM and snapshot support

  • /boot 1024MiB
  • /boot/efi 200 MiB
  • / 50GB minimum
  • /swap 8GB to 24GB(hibernation) or none

Update software repos

@jkatz
jkatz / setup.sh
Last active September 9, 2023 03:00
Install PostgreSQL 10 & pgAdmin 4 with Docker
#!/bin/bash
mkdir postgres
cd postgres
docker volume create --driver local --name=pgvolume
docker volume create --driver local --name=pga4volume
docker network create --driver bridge pgnetwork
@mateobur
mateobur / CloudFormationTemplateOpenShift.yaml
Created January 23, 2018 22:19
CloudFormation Template OpenShift
AWSTemplateFormatVersion: '2010-09-09'
Metadata: {}
Parameters:
###########
KeyName:
Description: The EC2 Key Pair to allow SSH access to the instance
Type: 'AWS::EC2::KeyPair::KeyName'
AvailabilityZone:
Description: Availability zone to deploy
@NigelEarle
NigelEarle / Knex-Migrations-Seeding.md
Last active June 19, 2024 14:20
Migration and seeding instructions using Knex.js!

Migrations & Seeding

What are migrations??

Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.

To learn more about migrations, check out this article on the different types of database migrations!

Creating/Dropping Tables

@BretFisher
BretFisher / docker-swarm-ports.md
Last active June 11, 2024 14:06
Docker Swarm Port Requirements, both Swarm Mode 1.12+ and Swarm Classic, plus AWS Security Group Style Tables

Docker Swarm Mode Ports

Starting with 1.12 in July 2016, Docker Swarm Mode is a built-in solution with built-in key/value store. Easier to get started, and fewer ports to configure.

Inbound Traffic for Swarm Management

  • TCP port 2377 for cluster management & raft sync communications
  • TCP and UDP port 7946 for "control plane" gossip discovery communication between all nodes
  • UDP port 4789 for "data plane" VXLAN overlay network traffic
  • IP Protocol 50 (ESP) if you plan on using overlay network with the encryption option

AWS Security Group Example

@rickbacci
rickbacci / sample.js
Created December 16, 2015 20:42 — forked from biglovisa/sample.js
react sample code
///// index.js
import React from 'react';
import ReactDOM from 'react-dom';
import HelloWorld from './HelloWorld';
ReactDOM.render(<HelloWorld name='Meeka' />, document.getElementById('container'));
///// HelloWorld.js
@rrgayhart
rrgayhart / gist:cf5dcefdf3975598f491
Last active June 26, 2022 06:09
Adding Sinon to WebPack

Adding Sinon to WebPack

  • Open your project (if you're using WebPack, obviously)

  • npm install sinon --save-dev

  • You should now have Sinon in your node modules and listed in your package.json file

  • In your tests, require Sinon: var sinon = require('sinon');

<!DOCTYPE html>
<html>
<head>
<meta name="charset" content="UTF-8">
<title>Buttons Upon Buttons</title>
<style>
button {
padding: 1em;
border: none;
}
@biglovisa
biglovisa / _dashboard.js
Last active November 9, 2015 18:12
React session
// Annotated Code -- CRUD with Rails-React
// Functions we get from the React framework will be marked with -> R!
// to get the full repo: `$ git clone git@github.com:applegrain/ideabox-react.git`
// https://facebook.github.io/react/docs/thinking-in-react.html
// Good read to get into the React state of mind
// Create a new dashboard component.
var Dashboard = React.createClass({
@JoshCheek
JoshCheek / love.rb
Last active October 31, 2015 19:05
Love.rb
_ \
, __ , # (C) Josh Cheek
*,_ = # 2015
def __ ___ , # Inspiration
*__, **_ # Is
putc ___ # Obviously
end, def _ *_, # Yusuke
**__ # Endoh
_. #
map {|_ ;__ # And