Skip to content

Instantly share code, notes, and snippets.

@florido
florido / homebrew-github-api-token.md
Created January 5, 2019 23:26 — forked from christopheranderton/homebrew-github-api-token.md
Set your Github API Token If you hit a ”GitHub API rate limit exceeded” when searching with Homebrew (http://brew.sh/).

Description

PLEASE SCROLL DOWN AND READ THE COMMENTS FOR A MORE UP TO DATE WAY (AND EASIER) TO DO THIS
When using Homebrew (http://brew.sh) and searching formulas or pull requests you may get the dreaded error message: Github API Rate limit exceeded

Let's fix that! (yeah!)


Short version

PLEASE SCROLL DOWN AND READ THE COMMENTS FOR A MORE UP TO DATE WAY (AND EASIER) TO DO THIS

@florido
florido / new_mac.sh
Created December 26, 2018 06:29 — forked from darkn3rd/new_mac.sh
Joaquin's New MacBook Starter Script
# Command Line Tools
xcode-select --install
# Download XCode
# Instructions: https://stackoverflow.com/questions/4081568/downloading-xcode-with-wget-or-curl
# URL: https://download.developer.apple.com/Developer_Tools/Xcode_10.1/Xcode_10.1.xip
sudo xcodebuild -license
# Mojave only - need headers or nothing works
TOOLS_PATH="/Library/Developer/CommandLineTools/"
@florido
florido / GUIDE.MD
Created December 26, 2018 06:19 — forked from darkn3rd/GUIDE.MD
Pedantic ADHD Guide to DevOps ToolBox

Pedantic ADHD Guide to DevOps ToolBox: Mac OS X Version

This is my guide to getting essential tools for DevOps on Mac OS X.

XCode Command Line Tools

You need XCode command line tools. Type git or something and run through instructions.

If you have all day to download the full Xcode IDE compiler, point Xcode command line tools to Xcode (don't ask):

# run: curl -L https://gist.github.com/rebootd/df4bf929761b30212df49b222ba9c839/raw | sh
# remove brew apps
for entry in `brew cask list`; do
`brew cask uninstall $entry`
done
for entry in `brew list`; do
`brew uninstall $entry`
done
@florido
florido / gitcheats.txt
Created November 24, 2018 01:24 — forked from chrismccoy/gitcheats.txt
git cheats
# shortform git commands
alias g='git'
# get a list of all commit messages for a repo
git log --pretty=format:'%s'
# find the nearest parent branch of the current git branch
git show-branch -a | grep '\*' | grep -v `git rev-parse --abbrev-ref HEAD` | head -n1 | sed 's/.*\[\(.*\)\].*/\1/' | sed 's/[\^~].*//'
# push changes to an empty git repository for the first time
@florido
florido / gh-get.py
Created November 23, 2018 20:50 — forked from SpotlightKid/gh-get.py
Download a single file from a GitHub repository
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# gh-get.py
#
"""Download a single file from a GitHub repository."""
import shutil
from os.path import expanduser
@florido
florido / gh-get.py
Created November 23, 2018 20:50 — forked from SpotlightKid/gh-get.py
Download a single file from a GitHub repository
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# gh-get.py
#
"""Download a single file from a GitHub repository."""
import shutil
from os.path import expanduser
@florido
florido / clone-gists.py
Created November 23, 2018 20:50 — forked from SpotlightKid/clone-gists.py
Clone all gists of GitHub username given on the command line.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Clone all gists of GitHub user with given username.
Clones all gist repos into the current directory, using the gist id as the
directory name. If the directory already exists as a git repo, try to perform a
'git pull' in it.
"""
@florido
florido / backup.sh
Created November 23, 2018 20:48 — forked from nicerobot/backup.sh
Clone or update a user's gists locally
#!/bin/bash
curl -ks https://gist.githubusercontent.com/nicerobot/1622504/raw/gist-backup.py | USER=${USER} python3
@florido
florido / config: Focus blocked websites.txt
Created November 23, 2018 02:53
Websites I have blocked with Focus. Can save as .txt and import into Focus.
https://github.com/.*/.*/graphs/traffic/
https://www.reddit.com/r/apple/
https://www.reddit.com/r/linux/
https://www.youtube.com/feed/subscriptions
https://news.ycombinator.com/
https://www.reddit.com/r/lsd/
https://news.ycombinator.com/news/
https://www.reddit.com/me/m/top/
https://www.reddit.com/r/researchchemicals/
https://www.facebook.com/