In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:
- Separate big codebases into multiple repositories.
<section data-background-transition='zoom' data-transition='concave' data-background='http://ryanjarvinen.com/presentations/shared/img/broadcast_reveal_dark.png' data-state='blackout'> | |
<h2>Gist-Powered</h2> | |
<h1>Reveal.js</h1> | |
<h2>Slideshow Presentations</h2> | |
<br/> | |
<h1 class='fragment grow'><a style='color:deepskyblue;' href='http://gist-reveal.it'>gist-reveal.it</a></h1> | |
</section> | |
<section data-markdown> | |
<textarea data-template> | |
## Welcome! |
that I bookmarked but never had enough time to read
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |
const store = createStore((state = { counter: 0 }, action) => { | |
switch(action.type) { | |
case "INCREMENT": | |
return { counter: state.counter + 1 } | |
case "DECREMENT": | |
return { counter: state.counter - 1 } | |
default: | |
return state | |
} | |
}) |
[ | |
{ "country": "Austria", "code": "AT" }, | |
{ "country": "Belgium", "code": "BE" }, | |
{ "country": "Bulgaria", "code": "BG" }, | |
{ "country": "Croatia", "code": "HR" }, | |
{ "country": "Cyprus", "code": "CY" }, | |
{ "country": "Czech Republic", "code": "CZ" }, | |
{ "country": "Denmark", "code": "DK" }, | |
{ "country": "Estonia", "code": "EE" }, | |
{ "country": "Finland", "code": "FI" }, |
Afghanistan | |
Albania | |
Algeria | |
Andorra | |
Angola | |
Antigua and Barbuda | |
Argentina | |
Armenia | |
Australia | |
Austria |
pragma solidity ^0.4.19; | |
contract ERC721 { | |
string constant private tokenName = "My ERC721 Token"; | |
string constant private tokenSymbol = "MET"; | |
uint256 constant private totalTokens = 1000000; | |
mapping(address => uint) private balances; | |
mapping(uint256 => address) private tokenOwners; | |
mapping(uint256 => bool) private tokenExists; | |
mapping(address => mapping (address => uint256)) private allowed; | |
mapping(address => mapping(uint256 => uint256)) private ownerTokens; |