Skip to content

Instantly share code, notes, and snippets.

@pudquick
pudquick / brew.md
Last active June 24, 2024 19:41
Lightly "sandboxed" homebrew on macOS

brew is a bad neighbor

This isn't a guide about locking down homebrew so that it can't touch the rest of your system security-wise.

This guide doesn't fix the inherent security issues of a package management system that will literally yell at you if you try to do something about "huh, maybe it's not great my executables are writeable by my account without requiring authorization first".

But it absolutely is a guide about shoving it into its own little corner so that you can take it or leave it as you see fit, instead of just letting the project do what it likes like completely taking over permissions and ownership of a directory that might be in use by other software on your Mac and stomping all over their contents.

By following this guide you will:

  • Never have to run sudo to forcefully change permissions of some directory to be owned by your account
@aleDsz
aleDsz / elixir_test_with_mox.exs
Last active December 8, 2020 20:26
Elixir test with Mox
# prod.exs
use Mix.Config
config :my_app, twitter_client: MyApp.Twitter.HTTP
# test.exs
use Mix.Config
config :my_app, twitter_client: MyApp.TwitterMock
# mix.exs
defmodule MyApp do
@velyan
velyan / Build Skia on MacOS
Last active July 10, 2024 01:14
Steps to build Skia on MacOS
mkdir $HOME/deps
cd $HOME/deps
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
git clone https://github.com/google/skia.git
export PATH="${PWD}/depot_tools:${PATH}"
cd skia
python tools/git-sync-deps
//static
bin/gn gen out/release --args="is_official_build=true skia_use_system_expat=false skia_use_system_icu=false skia_use_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false skia_use_libwebp=false extra_cflags_cc=[\"-frtti\"]"
@maxcnunes
maxcnunes / remove-node_module-recursively-1.sh
Last active January 25, 2017 17:24
Remove all node_module folders recursively. Useful to free up disk space by removing the node_module from those projects you have not used for a while.
# Simple version using only "find"
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@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

@PurpleBooth
PurpleBooth / README-Template.md
Last active July 18, 2024 23:22
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@arthurgouveia
arthurgouveia / gist:fef6e127a479cfe3ef83
Last active August 29, 2015 14:11
Sass & Compass sprites for standard and HD displays
// Sprite mappers
$sprite: sprite-map('sprite/standard/*.png', $layout: 'smart');
$sprite-hd: sprite-map('sprite/hd/*.png', $layout: 'smart');
// HD media query
$hd: 'print, (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi)';
// HD mixin sprite
// Your HD files should necessarily be twice the size of the standard ones
@mixin hd-sprite {
@gbuesing
gbuesing / ml-ruby.md
Last active February 28, 2024 15:13
Resources for Machine Learning in Ruby

UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!

Resources for Machine Learning in Ruby

Gems

@staltz
staltz / introrx.md
Last active July 15, 2024 15:43
The introduction to Reactive Programming you've been missing