Skip to content

Instantly share code, notes, and snippets.

View antonydb's full-sized avatar

Antony Del Beato antonydb

  • 101Ways
  • London, UK
View GitHub Profile
@antonydb
antonydb / git-cleanup-repo
Created January 14, 2021 23:28 — forked from robmiller/git-cleanup-repo
A script for cleaning up Git repositories; it deletes branches that are fully merged into `origin/master`, prunes obsolete remote tracking branches, and as an added bonus will replicate these changes on the remote.
#!/bin/bash
# git-cleanup-repo
#
# Author: Rob Miller <rob@bigfish.co.uk>
# Adapted from the original by Yorick Sijsling
git checkout master &> /dev/null
# Make sure we're working with the most up-to-date version of master.
git fetch
@antonydb
antonydb / gist:66d57e789de0d1e234f0276f7117e279
Created April 4, 2019 12:02
Prevent spotlight indexing node_modules
find . -type d -name "node_modules" -exec touch "{}/.metadata_never_index" \;
@antonydb
antonydb / .eslintrc
Created March 27, 2017 13:30
Really basic eslintrc for react projecs
module.exports = {
"extends": "airbnb",
"plugins": [
"react",
"jsx-a11y",
"import"
],
"rules": {
"react/jsx-filename-extension": ["error", { "extensions": [".js", ".jsx"] }],
"comma-dangle": ["error", {
@antonydb
antonydb / gist:c17120dfa09b76590862
Created April 28, 2015 13:22
Setting up Git deploy to EC2
The following instructions are for setting up git deployment on an AWS ec2 ubuntu instance (or any ubuntu server for that matter). Also included are instructions for deploying to the remote server and github simultaneously.
Git deploy setup:
1. copy your public key to your ec2 instance:
cat ~/.ssh/id_rsa.pub | ssh -i ~/.ssh/your_pemfile.pem ubuntu@your_ip_addr "cat>> .ssh/authorized_keys"
2. on remote server: create bare git directory
$ cd ~