Skip to content

Instantly share code, notes, and snippets.

View justinhartman's full-sized avatar
🏠
Working from home

Justin Hartman justinhartman

🏠
Working from home
View GitHub Profile
@justinhartman
justinhartman / sublimerge.md
Last active March 7, 2018 14:26
Sublimerge 3

Package Control Messages

Sublimerge 3

Sublimerge 3 (beta) has just been installed. Thanks for trying it out!

It is highly recommended to restart Sublime Text before first use.

@justinhartman
justinhartman / raven-ssl-commands.md
Last active March 5, 2018 17:16
RavenDB SSL Certificate Generator

RavenDB SSL Certificate Generator

A quick note on the command for generating a valid SSL certificate for [RavenDB][raven] using openssl. You will need to have followed [this tutorial][howto] to be able to simply run this one command below. If you don't have a valid localhost SSL certificate with a valid Certificate Authority keychain file then this won't work. The [tutorial][howto] covers this all so don't fret.

Generate SSL Certificate

$ cd ~/.localhost/ca/intermediate
$ openssl pkcs12 -export -out ravendb/certificate.pfx -inkey private/localhost.key.pem \
      -in certs/localhost.cert.pem -certfile certs/ca-chain.cert.pem
@justinhartman
justinhartman / screenshots.md
Last active March 2, 2018 17:18
Change the Default Save Location of Screenshots in Mac OS X

Change the Default Save Location of Screenshots in Mac OS X

This is how you change the default save location of screenshots to anywhere you want in Mac OS X.

Create a New Folder

Choose a location, like the Downloads folder and create a folder called Screenshots (or whatever you'd like) where your screenshots will now be saved. In this example I created a folder called Screenshots in my Downloads folder. You will need the path to this folder in the next step so remember what it is. My path to the folder is ~/Downloads/Screenshots; you don't need the full path and the tilda (~) represents the symbolic link to my home folder - i.e. /Users/macbookpro/ or /Users/your_name/.

Setting the New Location

Open up your Terminal application found in /Applications/Utilities/Terminal.app and enter the following command.

$ defaults write com.apple.screencapture location ~/Downloads/Screenshots
@justinhartman
justinhartman / 01_self-signed-ssl-howto.md
Last active April 30, 2025 18:41
How to create self-signed SSL certificates for localhost that actually works

How to create self-signed SSL certificates for localhost

Option 1

Create a directory in your user root directory where we will store the necessary generated files.

$ cd ~/
$ mkdir .localhost
$ cd .localhost

Now run this single command and you will have both a certificate and private key which was used to sign the certificate.

@justinhartman
justinhartman / grav.log
Created February 23, 2018 02:06
Grav Email plugin v2.7.1 error log
[2018-02-23 04:01:38] grav.CRITICAL: An exception has been thrown during the rendering of a template ("Array to string conversion").
Trace:
#0 /Volumes/Storage/Personal/Code/Bitbucket/grav-cms/cache/twig/aa/aaab75792f569c46fa615c07b11a280129befc59c135accab1661b56ee376e04.php(230): Twig_Template->displayBlock('input', Array, Array)
#1 /Volumes/Storage/Personal/Code/Bitbucket/grav-cms/vendor/twig/twig/lib/Twig/Template.php(215): __TwigTemplate_c951f6fc011e16a161e8d3f5f5bc93c82cdb43b0cf185804d0f5f77b7dbe185e->block_group(Array, Array)
#2 /Volumes/Storage/Personal/Code/Bitbucket/grav-cms/cache/twig/aa/aaab75792f569c46fa615c07b11a280129befc59c135accab1661b56ee376e04.php(158): Twig_Template->displayBlock('group', Array, Array)
#3 /Volumes/Storage/Personal/Code/Bitbucket/grav-cms/vendor/twig/twig/lib/Twig/Template.php(215): __TwigTemplate_c951f6fc011e16a161e8d3f5f5bc93c82cdb43b0cf185804d0f5f77b7dbe185e->block_contents(Array, Array)
#4 /Volumes/Storage/Personal/Code/Bitbucket/grav-cms/cache/twig/aa/aaab75792f569
cc1: some warnings being treated as errors
scripts/Makefile.build:308: recipe for target '/tmp/selfgz1736/NVIDIA-Linux-x86_64-375.26/kernel/nvidia-uvm/uvm8_range_group_tree_test.o' failed
make[2]: *** [/tmp/selfgz1736/NVIDIA-Linux-x86_64-375.26/kernel/nvidia-uvm/uvm8_range_group_tree_test.o] Error 1
CC [M] /tmp/selfgz1736/NVIDIA-Linux-x86_64-375.26/kernel/nvidia-modeset/nvidia-modeset-linux.o
SYMLINK /tmp/selfgz1736/NVIDIA-Linux-x86_64-375.26/kernel/nvidia-modeset/nv-modeset-kernel.o
LD [M] /tmp/selfgz1736/NVIDIA-Linux-x86_64-375.26/kernel/nvidia-modeset.o
CC [M] /tmp/selfgz1736/NVIDIA-Linux-x86_64-375.26/kernel/nvidia-drm/nvidia-drm.o
In file included from /tmp/selfgz1736/NVIDIA-Linux-x86_64-375.26/kernel/nvidia-drm/nvidia-drm.c:27:0:
/tmp/selfgz1736/NVIDIA-Linux-x86_64-375.26/kernel/nvidia-drm/nvidia-drm-priv.h:37:25: fatal error: linux/fence.h: No such file or directory
@justinhartman
justinhartman / blessing.md
Last active March 29, 2021 15:34
The most amazing copyright notice, ever!

Copyright Notice for Projects

Instead of a copyright notice contained inside of a source code file, I found the following blessing instead. I want to use this at some point.

*
* The author disclaims copyright to this source code. In place of
* a legal notice, here is a blessing:
*
* May you do good and not evil.
@justinhartman
justinhartman / embedded-gist.json
Created July 9, 2017 01:00
This is to be used to demonstrate how you embed Gists into your Github Pages website using Jekyll
{
"name": ".publish",
"path": ".publish",
"sha": "3f949857e8ed4cb106f9744e40b638a7aabf647f",
"size": 9,
"url": "https://api.github.com/repos/justinhartman/howto/contents/.publish?ref=master",
"html_url": "https://github.com/justinhartman/howto/blob/master/.publish",
"git_url": "https://api.github.com/repos/justinhartman/howto/git/blobs/3f949857e8ed4cb106f9744e40b638a7aabf647f",
"download_url": "https://raw.githubusercontent.com/justinhartman/howto/master/.publish",
"type": "file",
@justinhartman
justinhartman / embedded-gist.php
Last active February 26, 2018 19:39
Embedded Gist
<?php
/*
Ensure that the $age variable is set to null before running the myLife function.
*/
$age = nil
/**
* This function returns a message to the user telling them how old they are.
*
@justinhartman
justinhartman / license-badges.md
Created June 20, 2017 18:30 — forked from lukas-h/license-badges.md
License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • Badges are made with Shields.io.
  • This badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.  
  • 🇫🇷 Cette liste en français