Skip to content

Instantly share code, notes, and snippets.

View crcastle's full-sized avatar
:shipit:

Chris Castle crcastle

:shipit:
View GitHub Profile
@felipemeamaral
felipemeamaral / install-go-using-asdf-for-vscode-on-macos.md
Last active April 12, 2024 17:03
Install Go using asdf on macOS

Install Go using asdf for Visual Studio Code on macOS

I had a lot of issues trying to install Golang on macOS using asdf package manager to develop on Visual Studio Code.

So here's the steps needed to setup it properly:

Open Terminal and install asdf with this command:

You have to install Homebrew before running the installation command.

@jasonk
jasonk / Reolink API.md
Last active March 27, 2024 15:54
Simple Bash Examples for Reolink API
@uraimo
uraimo / dnsovertls.md
Last active March 22, 2024 20:55
Configure your Mac to use DNS over TLS
@koreno
koreno / README.md
Last active April 1, 2020 10:44
'rebaser' improves on 'git rebase -i' by adding information per commit regarding which files it touched.

Prebase

git-prebase improves on 'git rebase -i' by adding information per commit regarding which files it touched.

  • Each file gets an alpha-numeric identifier at a particular column, a list of which appears below the commit list. (The identifiers wrap around after the 62nd file)
  • Commits can be moved up and down safely (without conflicts) as long as their columns don't clash (they did not touch the same file).

Installation

Add the executable to your path and git will automatically expose it as

#!/bin/bash
echo '#!/bin/bash'
echo ''
echo 'failed_items=""'
echo 'function install_package() {'
echo 'echo EXECUTING: brew install $1 $2'
echo 'brew install $1 $2'
echo '[ $? -ne 0 ] && $failed_items="$failed_items $1" # package failed to install.'
echo '}'

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@ttscoff
ttscoff / rtftomarkdown.rb
Created October 9, 2012 21:05
Convert RTF/DOC files to Markdown via Textutil
#!/usr/bin/ruby
=begin
Usage: rtftomarkdown.rb FILENAME.rtf
Uses textutil, available on Mac only (installed by default)
Outputs to STDOUT
Notes:
Links are replaced with Markdown references (duplicate links combined).
@thesharp
thesharp / ML, Python and virtualenv.md
Created July 25, 2012 22:56
Quick virtualenv fix on Mountain Lion

Quick virtualenv fix on Mountain Lion

Overview

It appears that Apple somehow broke Python in Mountain Lion, so even with the latest Command Line Tools and Xcode 4.4 virtualenv won't properly work. During virtual environment creation it will try to install easy_install inside /Library hierarchy. So let's give it a quick workaround. Let's install custom python into your $HOME-directory using pythonbrew!

Installing proper Command Line Tools

Without the Apple Mac Developer account you won't even see the proper download link for the latest CL Tools and the old one won't work on ML. So here's the link: http://goo.gl/iBTXh. It points towards the Apple website so don't worry.

githubAccount() { # Syntax: githubAccount <file>
# Check for Github account name
if [[ "$githubAccount" == '' ]]; then
if [[ ! -f "$file" ]]; then
# If .github doesn't exist then ask for the name and save it
echo -n "What is your Github name? "
read githubAccount
touch "$file"
echo "$githubAccount" > "$file"
else
@luigi
luigi / counter.rb
Last active October 27, 2015 00:24
Calculate the percentage of tweets linking to a website that came from the Tweet button
#
# Before running:
# $ gem install twitter
#
# Register a Twitter application to get auth credentials:
# https://dev.twitter.com/apps
#
# To run:
# $ ruby counter.rb upworthy.com 500
#