This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace Jekyll's handling of the Redcarpet code_block (which already adds | |
# support for highlighting, but needs support for the very non-standard | |
# "code fences with line highlights" extension). | |
# Since this is currently depending on Redcarpet to cooperate, we are going to | |
# be naive, and only allow line highlighting when a language is specified. If | |
# you don't want any syntax highlighting but want to highlight lines, then you | |
# need to specify text as your language (or it will break), like: | |
# ```text{4} | |
module Jekyll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const jsdom = require('jsdom'); | |
const makeKey = (attr) => { | |
return attr.split(/[-:]/).map((s, i) => { | |
return i === 0 ? s : s[0].toUpperCase() + s.slice(1); | |
}).join(''); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @jsx React.DOM */ | |
var MyComponent = React.createClass({ | |
render: function() { | |
// Defaults in case the props are undefined. We'll have a solution for this | |
// soon that is less awkward. | |
var perMinute = this.props.perMinute || '-'; | |
var perDay = this.props.perDay || '-'; | |
return ( | |
<div> | |
<h3>Clickouts</h3> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
const util = require('util'); | |
const execp = util.promisify(require('child_process').exec); | |
main(process.argv[2], process.argv[3]); | |
async function main(pkg, user) { | |
const whoamioutput = await execp(`npm whoami`); | |
const whoami = whoamioutput.stdout.trim(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This will generate 31329 <rect>s for a level 40 QR Code (177x177). | |
// This approach is totally fine in <canvas> (but should learn from Smarter impl below) | |
// Lorem Ipsum test content was ~2MB | |
class QRCodeSVG extends React.Component<Props> { | |
render() { | |
var {value, size, level, bgColor, fgColor} = this.props; | |
var qrcode = new QRCodeImpl(-1, ErrorCorrectLevel[level]); | |
qrcode.addData(value); | |
qrcode.make(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// inspired by https://github.com/tj/git-extras/blob/master/bin/git-line-summary | |
const util = require("util"); | |
const exec = util.promisify(require("child_process").exec); | |
const execSync = require("child_process").execSync; | |
const DIR = "/Users/poshannessy/FB/code/react-clean"; | |
const REF = "origin/master"; | |
const AUTHOR = "Paul O’Shannessy"; | |
const PERIOD_DAYS = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/opensource.html b/opensource.html | |
index 043dd2c..27382bf 100644 | |
--- a/opensource.html | |
+++ b/opensource.html | |
@@ -100,14 +100,14 @@ | |
<div id="trending" class="project-group"> | |
<div class="container"> | |
<div class="group-content"> | |
- <h2>trending</h2> | |
+ <h2>Trending</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/opensource.html b/opensource.html | |
index 043dd2c..affea25 100644 | |
--- a/opensource.html | |
+++ b/opensource.html | |
@@ -100,14 +100,14 @@ | |
<div id="trending" class="project-group"> | |
<div class="container"> | |
<div class="group-content"> | |
- <h2>trending</h2> | |
+ <h2>Trending</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/opensource.html b/opensource.html | |
index 043dd2c..affea25 100644 | |
--- a/opensource.html | |
+++ b/opensource.html | |
@@ -100,14 +100,14 @@ | |
<div id="trending" class="project-group"> | |
<div class="container"> | |
<div class="group-content"> | |
- <h2>trending</h2> | |
+ <h2>Trending</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"presets": ["./.babelrc.js"], | |
} |
NewerOlder