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
<html> | |
<head> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> | |
</head> | |
<body> | |
<div class="container" style="margin-top: 50px;"> | |
<button class="btn btn-primary do-something">Do Something</button> | |
</div> |
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
<html> | |
<body> | |
<button id="hide">HIDE!</button> | |
<div class="container"> | |
<p> | |
Bacon ipsum dolor amet landjaeger ham meatball pork chop, pig alcatra corned beef sirloin capicola boudin shankle turducken ham hock leberkas. Shank ham hock jowl pastrami, brisket pork loin meatloaf kevin boudin porchetta swine. Beef shoulder jerky, brisket shank tail rump hamburger doner salami biltong short loin. Chuck swine beef ribs tenderloin corned beef prosciutto salami ham, pastrami pork. Ground round t-bone pork belly meatloaf brisket prosciutto. | |
Tenderloin doner meatloaf, short ribs salami pastrami ball tip meatball brisket tail pork loin. Tenderloin kevin prosciutto, hamburger boudin venison filet mignon ham salami andouille. Bacon chicken cow strip steak kevin beef. Drumstick capicola beef ribs, cupim fatback shank chuck filet mignon landjaeger tenderloin turducken tri-tip spare ribs kevin venison. Leberkas fatback shankle shank alcatra pancetta andouille ham hock meatloaf. | |
Tenderloin boudin corned be |
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
<html> | |
<body> | |
<a href="javascript:;">javascript:;</a> | |
<p class="texts">text</p> | |
<p class="texts">text</p> | |
<p class="texts">text</p> | |
<p class="texts">text</p> | |
<p class="texts">text</p> | |
<p class="texts">text</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
function distance(lat1, lon1, lat2, lon2, unit) { | |
var radlat1 = Math.PI * lat1/180 | |
var radlat2 = Math.PI * lat2/180 | |
var radlon1 = Math.PI * lon1/180 | |
var radlon2 = Math.PI * lon2/180 | |
var theta = lon1-lon2 | |
var radtheta = Math.PI * theta/180 | |
var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta); | |
dist = Math.acos(dist) | |
dist = dist * 180/Math.PI |
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
describe('class creation', () => { | |
it('is as simple as `class XXX {}`', function() { | |
class TestClass {}; | |
const instance = new TestClass(); | |
assert.equal(typeof instance, 'object'); | |
}); | |
it('class is block scoped', () => { |
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 createRequestMiddleware = baseUrl => ({ dispatch }) => next => action => { | |
if (action.type !== 'api') { | |
return next(action) | |
} | |
const url = `${baseUrl}${action.url}`; | |
return fetch(url) | |
.then(res => res.json()) | |
.then(data => action.success(dispatch, data)) | |
} |
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
// Calculator | |
const operations = { | |
'+': (...nums) => nums.reduce((acc, num) => acc + num), | |
'*': (...nums) => nums.reduce((acc, num) => acc * num), | |
} | |
const calculatorCreator = (additionalOperations = {}) => { | |
const calculator = (...elements) => { | |
const operator = elements[elements.length-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
const getFiles = () => ({ | |
type: API, | |
path: '/files', | |
onSuccess: addFiles, | |
}); |
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 python3 | |
# Converts Day One exported notes to `enex` for Evernote importing | |
# Not complete | |
# It only exports: | |
# - title (assumed as the first line of the content starting with `# `) | |
# - content (rest of the content) | |
# - tags | |
# - created | |
# - updated |
OlderNewer