Skip to content

Instantly share code, notes, and snippets.

@cotyembry
cotyembry / DefaultKeyBinding.dict
Created April 1, 2017 16:25 — forked from trusktr/DefaultKeyBinding.dict
My DefaultKeyBinding.dict for Mac OS X
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more
closely match default behavior on Windows systems. This makes the Command key
behave like Windows Control key. To use Control instead of Command, either swap
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or replace @ with ^ in this file.
Here is a rough cheatsheet for syntax.
Key Modifiers
@cotyembry
cotyembry / createAppIconsiOS.md
Created April 14, 2017 22:46
A short and sweet example on how to create and link app icons for all iPhone screen sizes with pretty close to one command line call

First up,

Make sure to have everything installed that is needed

npm install -g yo generator-rn-toolbox

To generate your icons, the generator uses ImageMagick. On macOS, you can install it with:

brew install imagemagick

Have a single icon file at the ready somewhere. 200x200px is sufficient.

@cotyembry
cotyembry / viewFileVersionsXCodeCLI.md
Created April 30, 2017 00:20
Use this command to check the plist files and the versions of your targets and returns their version numbers
agvtool what-marketing-version
@cotyembry
cotyembry / githubCommitTimeBookmarklet.js
Created May 22, 2017 05:10
This is a bookmarklet that you can use in a web browser - when you execute it, its intended use is on github.com when you are viewing a commit - it will create an element and add the time it was committed at the very top top of the webpage (it uses document.body.prepend(...) to do that)
javascript:(function() { var el = document.createElement('div'); document.body.prepend(el); el.innerHTML = document.getElementsByTagName('relative-time')[0].getAttribute('title');}() )
@cotyembry
cotyembry / convertURLImageToBLOBThenEmailItInline.gs
Created May 24, 2017 05:49
This is a .gs (google script) file that will fetch an image from a url using I suppose some of the Google Services APIs, converts that object to a BLOB, then sends the image to the email specified with the images inline within the email (This is so freaking cool - I tested it myself ^_^)
// This code fetches the Google and YouTube logos, inlines them in an email
// and sends the email
function inlineImage() {
// var googleLogoUrl = "http://www.google.com/intl/en_com/images/srpr/logo3w.png";
var youtubeLogoUrl =
"https://developers.google.com/youtube/images/YouTube_logo_standard_white.png";
//var googleLogoBlob = UrlFetchApp
// .fetch(googleLogoUrl)
// .getBlob()
// .setName("googleLogoBlob");
@cotyembry
cotyembry / raspberrypiLinuxBackgroundProcess.md
Created August 21, 2017 00:26
Keep process running in background after disconnecting from ssh terminal session & &&