Skip to content

Instantly share code, notes, and snippets.

View johnnymillergh's full-sized avatar
💪
Coding & Building

Johnny Miller johnnymillergh

💪
Coding & Building
View GitHub Profile
@vitorbritto
vitorbritto / rm_mysql.md
Last active April 6, 2025 09:16
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
    
@mminer
mminer / cachedecorator.py
Created January 12, 2015 23:57
An example of a Python decorator to simplify caching a function's result.
"""An example of a cache decorator."""
import json
from functools import wraps
from redis import StrictRedis
redis = StrictRedis()
def cached(func):
@clemtibs
clemtibs / Commit Formatting.md
Last active February 13, 2025 03:36
Angular Commit Format Reference Sheet

Commit Message Format

This specification is inspired by and supersedes the [AngularJS commit message format][commit-message-format].

We have very precise rules over how our Git commit messages must be formatted. This format leads to easier to read commit history.

Each commit message consists of a header, a body, and a footer.

@renyu-io
renyu-io / Autohotkey.ahk
Last active January 10, 2022 06:32
Autohotkey for HHKB Windows (MAC OSX compatible)
; EMACS
^a::Send {Home}
^e::Send {End}
^b::Send {Left}
$^f::Send {Right}
^n::Send {Down}
^p::Send {Up}
^d::Send {Delete}
^h::Send {Backspace}
@csharpforevermore
csharpforevermore / AuthoHotKeyList.txt
Created April 27, 2014 15:50
AutoHotKey Key List
Key Name Resulting Keystroke
{F1} - {F24} Function keys. For example: {F12} is the F12 key.
{!} !
{#} #
{+} +
{^} ^
{{} {
{}} }
{Enter} ENTER key on the main keyboard
{Escape} or {Esc} ESCAPE
@jbonney
jbonney / mysqldump.sh
Created August 30, 2013 22:04
MySQL dump to export data only (no DB schema nor table instructions). Particularly useful when exporting a Rails DB to re-import it afterwards in a DB that has been created through `rake db:drop db:create db:migrate`.
mysqldump --user="username" --password="password" --skip-triggers --compact --no-create-info --ignore-table="database_name.schema_migrations" --ignore-table="database_name.table_populated_through_migration" "database_name" > "dump.sql"
@jackiekazil
jackiekazil / rounding_decimals.md
Last active January 17, 2024 12:29
How do I round to 2 decimals in python?

How do I round to 2 decimals?

In python, you have floats and decimals that can be rounded. If you care about the accuracy of rounding, use decimal type. If you use floats, you will have issues with accuracy.

All the examples use demical types, except for the original value, which is automatically casted as a float.

To set the context of what we are working with, let's start with an original value.

Original Value

@jonschlinkert
jonschlinkert / markdown-cheatsheet.md
Last active April 10, 2025 18:38
A better markdown cheatsheet.
@ajimix
ajimix / AutoHotkeyMacMapping.ahk
Created September 5, 2012 06:22
AutoHotkey script to remap some Mac shortcuts on Windows to make Windows more usable
#SingleInstance force
; Install autohotkey for windows and put the contents of this file in your
; documents folder AutoHotkey.ahk existing file.
#InstallKeybdHook
; Remap for Mac Like
!c::Send ^c
!+c::Send ^+c