Skip to content

Instantly share code, notes, and snippets.

View tzmartin's full-sized avatar
🏴‍☠️
ahoy!

tz ✨ tzmartin

🏴‍☠️
ahoy!
View GitHub Profile
@tzmartin
tzmartin / pony-render.md
Created September 3, 2016 06:43
Pony render snippet

Pony Render Example

This is deprecated in favor of Remark implementation. Posted here for posterity.

Tokenizer Example

let tokens = Pony.getTokens(str)
console.log(JSON.stringify(tokens))
@tzmartin
tzmartin / awesome-svg-icons.md
Created August 22, 2016 17:50
Awesome SVG Icons
@tzmartin
tzmartin / parse-markdown-for-position.js
Created August 12, 2016 17:00
determine line numbers and starting position from a single markdown string
src = '# Magic Deck\n\n## A markdown editor for creating magical slide shows\n\n---\n\n# How to Use\n\nJust use `---` for each slide and markdown syntax to make it look pretty.\n\nWhen you\'re ready, just use `⌘+R` to render.\n\n---\n\n# Your Turn\n\n';
var index = src.match(new RegExp('---\n\n', "gi")).length;
console.log('Found: ' + index);
var pos = src.indexOf('---\n\n', 75);
console.log('Pos: ' + pos);
@tzmartin
tzmartin / js-software-curriculum-100.md
Last active February 23, 2021 23:52
App (JavaScript) Developer Curriculum 100 - First Steps
  • First you need to remove the current version of appc-cli alloy.

~/.appcelerator/install/For CLI Version/package/node_modules/

delete the folder alloy

  • Go back to package folder and edit package.json file

change the alloy version from ~1.8.0 to 1.9.0

@tzmartin
tzmartin / how_to_get_mac_lcd_model_number.md
Last active August 25, 2018 08:11
How to Get a Mac LCD Model Number

To get the LCD part number type in or copy and paste the following string in to the terminal:

ioreg -lw0 | grep IODisplayEDID | sed "/[^<]*</s///" | xxd -p -r | strings -6

After executing the command you should receive a set of digits and numbers. If you want to determine the manufacturer of your display, simply take the model number generated in Terminal and type it into Google. Usually various OEM part listings will show the name of the brand for your particular LCD screen.

screenshot

<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>amazonaws.com</key>
<dict>
<key>NSThirdPartyExceptionMinimumTLSVersion</key>
<string>TLSv1.0</string>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
this.ycQuestions = [
"So what are you working on?",
"Have you raised funding?",
"What makes new users try you?",
"What competition do you fear most?",
"What’s the worst thing that has happened?",
"Will you reincorporate as a US company?",
"What’s an impressive thing you have done?",
"Where is the rocket science here?",
"Why did you pick this idea to work on?",
@tzmartin
tzmartin / transform.js
Created April 2, 2016 18:18
js transform function
function Test() {
this.data = {
"foo":"bar"
};
}
Test.prototype.transform = function(str) {
var err = false;
@tzmartin
tzmartin / moment-examples-js
Created March 28, 2016 06:56
moment.js examples
// node:
var moment = require('moment');
moment().add('days', 2).fromNow();
// 'in 2 days'
moment().subtract('days', 2).fromNow();
// '2 days ago'
moment('November 1977').fromNow()