Skip to content

Instantly share code, notes, and snippets.

View berryp's full-sized avatar
😎

Berry Phillips berryp

😎
  • Seoul, Korea
  • 18:25 (UTC +09:00)
View GitHub Profile
@dusty-phillips
dusty-phillips / init.vim
Created February 16, 2021 14:04
2021 Neovim Config
set termguicolors
set background=dark
let g:bubbly_palette = #{
\ background: "#34343c",
\ foreground: "#c5cdd9",
\ black: "#3e4249",
\ red: "#ec7279",
\ green: "#a0c980",
@webframp
webframp / keybase.md
Created July 25, 2017 18:14
Signing git commits on github using keybase.io gpg key

Probably one of the easiest things you'll ever do with gpg

Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH

First get the public key

keybase pgp export | gpg --import

Next get the private key

@pyrtsa
pyrtsa / version.bash
Last active March 23, 2023 06:47
Xcode: Set version and build number from Git
#!/bin/bash
# Xcode: Set version and build number from Git
# --------------------------------------------
#
# This script sets the version number `CFBundleShortVersionString` to one of
#
# - `1.2.3` -- for the tagged commit `v1.2.3` or a hyphen-separated prerelease,
# e.g. `v1.2.3-alpha`, `v1.2.3-alpha.2`, `v1.2.3-beta`, `v1.2.3-rc`.
# - `1.2.3-7-gabc1234` -- at commit `abc1234`, 7 commits after `v1.2.3`,
# - `1.2.3-7-gabc1234-dirty` -- when there are uncommitted changes, or
@berryp
berryp / install-libevent1.sh
Last active August 29, 2015 13:56
Install libevent 1.4 with Homebrew on OS X
#!/bin/bash
# Enter the Homebrew root directory.
cd `brew --prefix`
# Clean out all previous libevent installs.
echo "Removing any existing installations..."
brew uninstall libevent
brew cleanup libevent
@sindresorhus
sindresorhus / post-merge
Last active July 25, 2024 06:53
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
@jbenet
jbenet / simple-git-branching-model.md
Last active October 15, 2024 08:25
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@alfredodeza
alfredodeza / prepare-commit-msg
Last active March 17, 2017 11:20
Pre-commit hook to prepend the branch name on every commit message
#!/bin/sh
# this file should be marked as executable and placed on .git/hooks/
BRANCH_NAME=$(git branch 2>/dev/null | grep -e ^* | tr -d ' *')
# FogBugz
if [[ $BRANCH_NAME =~ ^case ]]; then
CASE_NUMBER=$(echo $BRANCH_NAME 2>/dev/null | tr -d "case" | tr -d "-" | tr -d "_")
echo "[case $CASE_NUMBER] $(cat $1)" > $1
@johntyree
johntyree / getBlockLists.sh
Last active June 4, 2024 12:30
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
@brianly
brianly / Solarized Dark.xml
Created January 16, 2012 18:47
Solarized Dark for PyCharm (Brian's edits of https://github.com/jkaving/intellij-colors-solarized)
<?xml version="1.0" encoding="UTF-8"?>
<scheme name="Solarized Dark" version="1" parent_scheme="Default">
<option name="LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_SIZE" value="14" />
<option name="EDITOR_FONT_NAME" value="Consolas" />
<colors>
<option name="ADDED_LINES_COLOR" value="" />
<option name="ANNOTATIONS_COLOR" value="2b36" />
<option name="ANNOTATIONS_MERGED_COLOR" value="" />
<option name="CARET_COLOR" value="dc322f" />