A Pen by Jake Trent on CodePen.
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
const electron = require('electron') | |
const app = electron.app | |
const BrowserWindow = electron.BrowserWindow | |
let mainWindow | |
app.on('ready', _ => { | |
mainWindow = new BrowserWindow({ | |
height: 400, |
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
<P className={glamor.css({ color: 'blue' })}>wow</P> |
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
import jsdomGlobal from 'jsdom-global' | |
import jsdom from 'jsdom' | |
import localStorage from 'localStorage' | |
const doc = jsdom.jsdom('<!doctype html><html><body></body></html>') | |
const win = doc.defaultView | |
win.localStorage = localStorage | |
global.document = doc | |
global.window = win | |
jsdomGlobal() |
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
.container { | |
display: flex; | |
height: 75px; | |
line-height: 75px; | |
justify-content: flex-start; | |
margin-bottom: 30px; | |
} | |
.container > div { | |
overflow: hidden; | |
white-space: nowrap; |
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
import jsdomGlobal from 'jsdom-global' | |
import jsdom from 'jsdom' | |
import localStorage from 'localStorage' | |
const doc = jsdom.jsdom('<!doctype html><html><body></body></html>') | |
const win = doc.defaultView | |
win.localStorage = localStorage | |
global.document = doc | |
global.window = win | |
jsdomGlobal() |
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
:export { | |
className: 'composedHashedClassName hashedClassName'; | |
} |
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
import d3 from 'd3' | |
import css from './index.css' | |
const rawData = [{'date':'2016-01-06','hours':2.7},{'date':'2016-01-07','hours':1.735},{'date':'2016-01-08','hours':0.5219},{'date':'2016-01-09','hours':0.0},{'date':'2016-01-10','hours':0.0},{'date':'2016-01-11','hours':2.2708},{'date':'2016-01-12','hours':1.2692},{'date':'2016-01-13','hours':0.2219},{'date':'2016-01-14','hours':3.2722},{'date':'2016-01-15','hours':0.3353},{'date':'2016-01-16','hours':0.5389},{'date':'2016-01-17','hours':0.0},{'date':'2016-01-18','hours':1.3308},{'date':'2016-01-19','hours':2.1228},{'date':'2016-01-20','hours':1.0539},{'date':'2016-01-21','hours':0.0},{'date':'2016-01-22','hours':1.2525},{'date':'2016-01-23','hours':1.8133},{'date':'2016-01-24','hours':1.9583},{'date':'2016-01-25','hours':3.3772},{'date':'2016-01-26','hours':0.9175},{'date':'2016-01-27','hours':0.4208},{'date':'2016-01-28','hours':0.0},{'date':'2016-01-29','hours':1.1847},{'date':'2016-01-30','hours':0.0175},{'date':'2016-01-31','hours':0.49},{'date':'2016-0 |
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
function keepTrying(otherArgs, promise) { | |
promise = promise||new Promise(); | |
// try doing the important thing | |
if(success) { | |
promise.resolve(result); | |
} else { | |
setTimeout(function() { | |
keepTrying(otherArgs, promise); |
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
UIFont *textFont = [UIFont fontWithName:@"Helvetica" size:40]; | |
UIColor *textForegroundColor = [UIColor blackColor]; | |
NSMutableParagraphStyle* textParagraphyStyle = [[NSMutableParagraphStyle alloc] init]; | |
textParagraphyStyle.lineSpacing = 15; | |
NSMutableAttributedString* pageText = | |
[[NSMutableAttributedString alloc] initWithString:@"Wow, text is being muted." | |
attributes:@{ NSParagraphStyleAttributeName: textParagraphyStyle, |