Skip to content

Instantly share code, notes, and snippets.

View mcandre's full-sized avatar

Andrew mcandre

  • Milwaukee, WI
View GitHub Profile
@mcandre
mcandre / vanilla-milkshake-for-dummies.md
Last active October 17, 2017 00:17
Vanilla Milkshake for Dummies
@mcandre
mcandre / chunky-monkey-hemp-shake.md
Last active October 17, 2017 00:18
Chunky Monkey Hemp Shake
@mcandre
mcandre / brownies-ez-mode.md
Last active October 17, 2017 00:18
Brownies EZ Mode
@mcandre
mcandre / sort-by-size.md
Last active June 21, 2024 04:22
Sort file and directories recursively by size

UNIX

Files: ls -lSh | tac

Directories: du -hd 1 | sort -h

Requires GNU coreutils (e.g., macOS users can run brew install coreutils).

macOS

@andrewbonnington
andrewbonnington / ceil.scpt
Last active October 12, 2024 22:55
AppleScript Ceil function
on ceil(x)
set y to x div 1
if x > 0 and x mod 1 is not 0 then
set y to y + 1
end if
return y
end ceil
@madeagency
madeagency / gist:79dc86e8aa09aa512af5
Created April 23, 2015 08:16
OSX Terminal Fix - perl: warning: Setting locale failed.
When running certain commands like ssh or git within Terminal on OSX you may get notices like the one below, which can be annoying.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
@mcandre
mcandre / git-ssh-access-faq.md
Last active October 16, 2024 14:21
Git/SSH Access Frequently Asked Questions

Git/SSH Access FAQ

If you see Access denied, or other error messages when trying to access a git repository or SSH server, here are some steps you can take to resolve the problem.

Enable verbose mode

When in doubt, run ssh -vvv <other options...> to enable more verbose logging.

How do I request git repo / ssh permissions?

Summary

Why am I getting unable to get local issuer certificate when I try to connect to gitlab.colo.networkedinsights.com:443?

Fix

$ wget -O /etc/httpd/ssl/gd_bundle-g2-g1.crt https://certs.godaddy.com/repository/gd_bundle-g2-g1.crt
@menzenski
menzenski / helloworld.asm
Created February 4, 2015 15:24
Hello World in Assembly language (x86-64 Unix-like operating systems, NASM syntax)
; MacOS X: /usr/local/bin/nasm -f macho64 *.s && ld -macosx_version_min 10.7 *.o
; Solaris/FreeBSD/DragonFly: nasm -f elf64 -D UNIX *.s && ld *.o
; NetBSD: nasm -f elf64 -D UNIX -D NetBSD *.s && ld *.o
; OpenBSD: nasm -f elf64 -D UNIX -D OpenBSD *.s && ld -static *.o
; OpenIndiana: nasm -f elf64 -D UNIX *.s && ld -m elf_x86_64 *.o
; Linux: nasm -f elf64 *.s && ld *.o
%ifdef NetBSD
section .note.netbsd.ident
dd 7,4,1
@vitorbritto
vitorbritto / rm_mysql.md
Last active May 6, 2025 19:35
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql