Skip to content

Instantly share code, notes, and snippets.

@redinger
redinger / Emacs.md
Created November 26, 2011 03:22
Setting up Emacs daemon on OS X

Setting up Emacs daemon on OS X

Tired of waiting for emacs to start on OS X? This step by step guide will teach you how to install the latest version of emacs and configure it to start in the background (daemon mode) and use emacsclient as your main editor.

Install Cocoa Emacs

Download the latest pretest version of [Emacs for Mac OS X]: http://emacsformacosx.com/builds

@scottjacobsen
scottjacobsen / git+clone+ssh+agent+forward+sudo
Created December 14, 2012 00:07
Git clone using ssh agent forwarding and sudo
SSH agent forwarding is great. It allows you to ssh from one server to
another all the while using the ssh-agent running on your local
workstation. The benefit is you don't need to generate ssh key pairs
on the servers you are connecting to in order to hop around.
When you ssh to a remote machine the remote machine talks to your
local ssh-agent through the socket referenced by the SSH_AUTH_SOCK
environment variable.
So you the remote server you can do something like:
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
@ejmr
ejmr / git-branch-show-description.sh
Last active May 29, 2022 07:41
Show the Description for the Current Branch
#!/bin/bash
#
# You can use `git branch --edit-description` to write a description
# for a branch, but Git provides no simple command to display that
# description. The "easiest" way to see it is via `git config --get
# branch.BRANCH_NAME.description`.
#
# This script automates that process and is meant to be used as
# a Git alias to provide a shorter command for showing the
# description of the current branch.
@outofcoffee
outofcoffee / find-ecr-image.sh
Last active March 1, 2024 13:35
Check if Docker image exists with tag in AWS ECR
#!/usr/bin/env bash
# Example:
# ./find-ecr-image.sh foo/bar mytag
if [[ $# -lt 2 ]]; then
echo "Usage: $( basename $0 ) <repository-name> <image-tag>"
exit 1
fi
IMAGE_META="$( aws ecr describe-images --repository-name=$1 --image-ids=imageTag=$2 2> /dev/null )"
@b0gdanw
b0gdanw / disable.sh
Last active March 17, 2024 11:10
Disable bunch of #$!@ in Catalina
# Credit: pwnsdx https://gist.github.com/pwnsdx/1217727ca57de2dd2a372afdd7a0fc21; nebular https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3#gistcomment-3019082
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to disable SIP: Reboot to Recovery, in Terminal csrutil disable
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# List disabled services: launchctl print-disabled user/501 |grep true & launchctl print-disabled system |grep true