Skip to content

Instantly share code, notes, and snippets.

@petehouston
petehouston / README.md
Created May 28, 2022 02:01
homebrew mariadb reset root password

Quick guide to reset MariaDB root password on MacOS.

This tip can be used if you forget or want to change MariaDB root password.

Make sure to install MariaDB using Homebrew.

This tip is from Update root password in MariaDB 10.4 on MacOS

For MariaDB prior to v10.4

@thetwopct
thetwopct / bash.sh
Last active July 20, 2021 19:06
Fix Safari "Can't establish a secure connection to the server" with self-signed certificates (Lando, Vagrant, Docker etc)
# Stop the HTTP storage manager (since it has an in-memory cache of the HSTS hosts).
killall nsurlstoraged
# Delete the HSTS cache file.
rm -f ~/Library/Cookies/HSTS.plist
# This may not work if Terminal is not configured for "Full Disk Access", so instead:
# Open Finder, Shift+Apple+G, paste in ~/Library/Cookies/ and manually delete HSTS.plist
# Start up nsurlstoraged again
launchctl start /System/Library/LaunchAgents/com.apple.nsurlstoraged.plist
@gaearon
gaearon / Classes.js
Created May 27, 2020 17:38
Beneath Classes: Prototypes
class Spiderman {
lookOut() {
alert('My Spider-Sense is tingling.');
}
}
let miles = new Spiderman();
miles.lookOut();
# https://help.github.com/articles/ignoring-files
# https://github.com/github/gitignore
#=================#
# Compiled source #
#=================#
*.class
*.dll
*.exe
*.o
@juliendargelos
juliendargelos / imagemagick-trim-transparent.sh
Last active October 23, 2023 02:31
Imagemagick command that trims transparent pixels from an image.
convert input.png -trim +repage output.png
@tannerhodges
tannerhodges / .zshrc
Last active December 12, 2023 03:21
# ------------------------------
# Appearance
# ------------------------------
# Enable colors
CLICOLOR=1
# Custom prompt
# - Git branch: https://www.mfitzp.com/article/add-git-branch-name-to-terminal-prompt-mac/
# - Current folder: https://superuser.com/a/142129, http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html
@santisbon
santisbon / Search my gists.md
Last active June 3, 2024 00:22
How to search gists.

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@Hunter-WebDev
Hunter-WebDev / delete-orphaned-meta.sql
Created October 19, 2017 10:57
Delete orphaned post meta within WordPress
DELETE pm FROM wp_postmeta pm
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id
WHERE wp.ID IS NULL
@cgutierrez
cgutierrez / git-yesterday.sh
Created August 25, 2016 15:14
Create a commit log of all the repositories in a directory
#!/usr/bin/env sh
PROJECTS_DIR=$HOME/Desktop/Werk/mode
LOG_FILE=$PROJECTS_DIR/commits.txt
AUTHOR='Chris Gutierrez'
# store the current dir
CUR_DIR=$(pwd)
#hey user
@alingham
alingham / Pixel Measure.jsx
Last active July 28, 2020 08:21 — forked from yorb/Pixel Measure.jsx
Photoshop script for adding measurements to your mockups, based on Pixel Measure v0.04 by Nikolaj Selvik (https://code.google.com/p/pixelmeasure/)
/*
Pixel Measure v0.04 - Photoshop script for adding pixel measurements to your mockups
Copyright (C) 2009 Nikolaj Selvik
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,