Skip to content

Instantly share code, notes, and snippets.

View davidjeddy's full-sized avatar
🏎️
Rockin' in the new world.

David J Eddy davidjeddy

🏎️
Rockin' in the new world.
View GitHub Profile
@jgautheron
jgautheron / One import via join.yaml
Created May 10, 2017 17:43 — forked from jespereneberg/One import via join.yaml
Fn::ImportValue from other stacks
Tags:
- Key: Name
Value:
!Join ['_', [ ec2, "Fn::ImportValue" : {"Fn::Sub":'${BaseStackName}-Environment'}, test2]]
#This will create a name tag with value: ec2_<yourValueFromOtherStack>_test2
@jameswilson
jameswilson / .gitconfig
Created February 15, 2017 19:40
git tree - a shorthand alias for a pretty cli git log graph
# Place this in your home directory's ~/.gitconfig file
[alias]
# a shorthand alias for a pretty cli git log graph
tree = "!git log --graph --decorate --pretty=format:'%C(yellow)%h %Cred%cr %Cblue(%an)%C(cyan)%d%Creset %s' --abbrev-commit --all"
@othyn
othyn / factorio_headless_guide.md
Last active April 15, 2024 08:27
How to setup a Factorio Headless Server

[LINUX] Factorio Headless Server Guide

So, with credit to the Factorio wiki and cbednarski's helpful gist, I managed to eventually setup a Factorio headless server. Although, I thought the process could be nailed down/simplified to be a bit more 'tutorialised' and also to document how I got it all working for my future records.

The specific distro/version I'm using for this guide being Ubuntu Server 16.04.1 LTS. Although, that shouldn't matter, as long as your distro supports systemd (just for this guide, not a Factorio headless requirement, although most distros use it as standard now). The version of Factorio I shall be using is 0.14.20, although should work for any version of Factorio 0.14.12 and higher.

Just a note to newcomers: If there are any issues with the installation steps, people in the comments are doing a good job

@leonardofed
leonardofed / README.md
Last active April 29, 2024 10:49
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.


@gwillem
gwillem / ansible-bootstrap-ubuntu-16.04.yml
Created June 16, 2016 21:59
Get Ansible to work on bare Ubuntu 16.04 without python 2.7
# Add this snippet to the top of your playbook.
# It will install python2 if missing (but checks first so no expensive repeated apt updates)
# gwillem@gmail.com
- hosts: all
gather_facts: False
tasks:
- name: install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
@andrius
andrius / Procfile
Last active July 22, 2022 22:00
How to dockerize #rails app with #puma. Edit config/application.rb and config/puma.rb #docker #ruby
api: bundle exec puma -C config/puma.rb
@m-coding
m-coding / regex-yyyy-mm-dd.js
Last active January 22, 2024 06:36
javascript regex to match date pattern YYYY-MM-DD
// allows YYYY/M/D and periods instead of slashes
// http://stackoverflow.com/questions/24989065/trying-to-validate-yyyy-mm-dd
/^\d{4}[\/.]\d{1,2}[\/.]\d{1,2}$/
// YYYY-MM-DD and YYYY-M-D
// http://stackoverflow.com/questions/6177975/how-to-validate-date-with-format-mm-dd-yyyy-in-javascript
/^\d{4}\-\d{1,2}\-\d{1,2}$/
// YYYY-MM-DD
// https://gist.github.com/arth2o/8471150
@pubkey
pubkey / Mad_Catz_linux.bash
Last active January 18, 2024 09:44
Mad Catz R.A.T. 7/9 on Linux ubuntu/mint
#The mouse will suck on linux because of the programmable buttons.
#This script will change the button-delegation so that the mouse doesn't stuck.
#@link https://community.linuxmint.com/hardware/view/10217
sudo mkdir /etc/X11/xorg.conf.d
sudo rm /etc/X11/xorg.conf.d/910-rat.conf
# add the following to the file
echo "Section \"InputClass\"" >> /etc/X11/xorg.conf.d/910-rat.conf
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@ronanguilloux
ronanguilloux / pre-commit
Last active February 21, 2022 12:44 — forked from cjsaylor/pre-commit
phplint + phpcs + php-cs-fixer PHP-related pre-commit git hook (needs to add squizlabs/php_codesniffer & fabpot/php-cs-fixer to your composer.json)
#!/bin/sh
# @source: https://gist.github.com/ronanguilloux/11f6a788358577474ab4
# @link http://tech.zumba.com/2014/04/14/control-code-quality/
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"`
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php`
# Determine if a file list is passed