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 React, { Component } from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
class App extends Component { | |
state = { | |
contacts: [], | |
} |
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 Component from "@reach/component-component"; | |
import { Transition } from 'react-spring'; | |
import { Transition as Transition2 } from 'react-transition-group'; | |
import ReactDOM from 'react-dom'; | |
import React from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
const style = { | |
padding: 10, |
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
// Another attempt at understanding monads by translating into my lingua franca | |
// http://www.infoq.com/presentations/Why-is-a-Monad-Like-a-Writing-Desk | |
// the return operation is prefixed with underscore because 'return' is a reserved name in ECMAScript | |
// Part 1: The door | |
// ================ | |
// Is it true that this could be a monadic return operation? | |
var _return = function(v) { |
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
var Lib2 = { | |
extend: function (props) { | |
var sub = Object.create(this); | |
sub = mixin(sub, props); | |
sub.super = this; | |
return sub; | |
} | |
}; | |
var Person = Lib.extend({ |
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
var Lib = { | |
extend: function (props) { | |
var sub = mixin(Object.create(this), props); | |
sub.super = this; | |
return sub; | |
}, | |
create: function () { | |
var instance = Object.create(this); | |
if (instance.init) { instance.init.apply(instance, arguments); } | |
return instance; |
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
var Person = { | |
init: function (name) { | |
this.name = name; | |
}, | |
speak: function () { | |
console.log(this.name); | |
} | |
}; | |
var Employee = Object.create(Person); |
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 Person(name) { | |
this.name = name; | |
} | |
Person.prototype.speak = function () { | |
console.log(this.name); | |
}; | |
function Employee(name) { |
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
/** | |
* CScott CSS/mobile logo | |
*/ | |
html { | |
font-family: 'Source Sans Pro', Arial, sans-serif; | |
background: url('http://subtlepatterns.subtlepatterns.netdna-cdn.com/patterns/noisy_grid.png'); | |
} | |
#logo { |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(35deg, #f06, yellow); | |
min-height:100%; | |
text-shadow: 4px 4px rgba(0,0,0,0.25); | |
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() { | |
// change this REGEXP to whatever you need | |
var PATTERN = /<title>(.*)<\/title>/g; | |
var message = '', | |
results = document.documentElement.innerHTML.match(PATTERN); | |
message = ((results && results.length) ? results.join('\n') : 'Not found.'); | |
window.alert(message); |
NewerOlder