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
@digitalresistor
digitalresistor / README.md
Created February 11, 2012 04:18
Generates various mpeg4 files from a gource run ...

Collection of Gource Helper Scripts

This collection of helper scripts are used to generate .mp4 files containing the output from [gource][1], a visualisation tool that generates pretty output from the git log output.

Requirements

  1. gource
  2. ffmpeg with x264 support
#!/usr/bin/env bash
git branch | grep -v "^*" | xargs git branch -D
#!/usr/bin/env bash
git branch | grep -v $(git rev-parse --abbrev-ref HEAD) | xargs git branch -D
@ChrisMacNaughton
ChrisMacNaughton / roulette.sh
Created March 8, 2018 09:23
bash Russian Roulette
alias roulette='sudo -k; (( $RANDOM % 6 == 0 )) && { echo *Bang* && sudo rm -rf / --no-preserve-root > /dev/null 2>&1; exit; } || echo *Click*'
@incyclum
incyclum / AWS IAM Policy - ForceMFA.json
Last active April 2, 2020 20:02
AWS IAM Policy - Force MFA - This policy allows users to manage their own passwords and MFA devices but nothing else unless they authenticate with MFA -- *EDIT*: I forgot where I found it in the 1st place. In fact this policy is explained statement by statement in AWS docs: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_users-self-man…
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAllUsersToListAccounts",
"Effect": "Allow",
"Action": [
"iam:ListAccountAliases",
"iam:ListUsers",
"iam:GetAccountPasswordPolicy",
@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
@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
@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
@marcandreappel
marcandreappel / xdebug_devilbox_phpstorm_postman.md
Last active August 22, 2022 06:24 — forked from yannbertrand/using_xdebug_with_postman.md
Using Xdebug on Devilbox with PhpStorm and Postman

The tutorial got a new home, head over to the newly created repo (for more flexibility and better interaction).

@rainabba
rainabba / config-docker.sh
Last active September 6, 2022 03:46
Install docker-ce, docker-compose and docker-sync in Ubuntu for WSL
#!/bin/bash
#
#This script assumes very little other than a fresh Ubuntu install (using the Windows store) on Win10 1709 or newer with WSL installed already
#In Powershell, run the following to install WSL and Ubuntu
#
#Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
#Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile ~/Ubuntu.zip -UseBasicParsing
#Expand-Archive ~/Ubuntu.zip ~/Ubuntu
#~/Ubuntu/ubuntu.exe
#