Skip to content

Instantly share code, notes, and snippets.

View johnmichel's full-sized avatar
👻
☕️

John Michel johnmichel

👻
☕️
View GitHub Profile
@johnmichel
johnmichel / nginx.conf
Created May 19, 2020 14:34 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

@johnmichel
johnmichel / throwDebugger.js
Last active July 11, 2017 15:06
throwDebugger is useful for tapping into a stream to check details about an event
// usage:
// .tap(event => throwDebugger(event))
// or
// function foo(event) {
// throwDebugger(event);
// // code that requires a closer look
// }
const throwDebugger = function throwDebugger(event) {
console.log('event is', event);
* { border-radius: 404px 53px 404px 46px / 57px 153px 59px 153px !important; }
@johnmichel
johnmichel / index.js
Last active May 11, 2017 21:01
requirebin sketch
const R = require('ramda');
const S = require('sanctuary');
const getNavigationProp = function getNavigationProp(prop, key, value, flatNav) {
console.log('prop is', prop) // displayName
console.log('key is', key) // slug
console.log('value is', value) // pet-products
/*
return R.compose(
@johnmichel
johnmichel / karabiner.json
Last active April 27, 2017 18:36
My Karabiner Elements Config for a Varmilo VA87MN
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"devices": [
{
@johnmichel
johnmichel / .block
Last active July 3, 2016 22:51 — forked from mbostock/.block
Wilson’s Algorithm III
license: gpl-3.0
  1. Quit Sublime Text 3.
  2. Remove any previously installed SublimeLinter packages (from ~/Library/Application Support/Sublime Text 3/Installed Packages AND ~/Library/Application Support/Sublime Text 3/Packages). It's ok if the ~/Library/Application Support/Sublime Text 3/Packages/User/SublimeLinter.sublime-settings is left in place. More on that later.
  3. Download this snapshot of SublimeLinter.
  4. Unzip the contents into ~/Library/Application Support/Sublime Text 3/Packages. There should now be a SublimeLinter folder there.
  5. Open Sublime Text 3. Everything should be working.

BONUS ROUND!

The new version of SublimeLinter includes the ability to enable gutter mark themes, which will supplement the outline style with icons for different error types. To enable these to work with the existing settings, copy the following code block into ~/Library/Application Support/Sublime Text 3/Packages/User/SublimeLinter.sublime-settings, below the line for `"sublimelinter_gutter_mar

@johnmichel
johnmichel / clear_table.js
Created September 4, 2012 21:01
Making copyable Bitbucket changelogs quick and easy
// https://bitbucket.org/REPOSITORY/compare/NEWERHASH..OLDERHASH
// run the code below in the console for the page above
$('td.author, td.hash, td.labels, td.date').css('display','none');
$('td.text').css('width','1000px');
@johnmichel
johnmichel / index.html
Created July 19, 2012 02:33
A web page created at CodePen.io
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Breaking Bad &middot; CodePen</title>
<!--
Copyright (c) 2012 John Michel, http://codepen.io/johnmichel
Permission is hereby granted, free of charge, to any person obtaining