Pretty much identical IMO.
// Lodash
const listOfAttrs = _.map(listOfObjects, (obj) => obj.attr);
// JS
const listOfAttrs = listOfObjects.map((obj) => obj.attr);
.wrapper-main { | |
max-width: 660px; | |
width: 100%; | |
margin: auto; | |
} | |
.container { | |
width: 100%; | |
/* You have to remove width: 40em; */ | |
} |
a, | |
a:link, | |
a:visited { | |
color: #4c7bd9; | |
text-decoration: none; | |
} | |
a:hover, | |
a:active { | |
color: #9dbaf2; | |
} |
### Keybase proof | |
I hereby claim: | |
* I am wbobeirne on github. | |
* I am willo (https://keybase.io/willo) on keybase. | |
* I have a public key whose fingerprint is 253A 48ED CDA1 3280 B4FF EC0F 8292 7AEC 03A2 CC97 | |
To claim this, I am signing this object: |
// ---- | |
// Sass (v3.4.12) | |
// Compass (v1.0.3) | |
// ---- | |
@function hub-px($px) { | |
@return #{$px / 12.8}vw; | |
} | |
.thing { |
<?php | |
/** | |
* Copy the data from one field to another, and delete the old field. | |
*/ | |
function merge_fields($old_field, $new_field, $entity_type = '', $bundle = '') { | |
$prefixes = array( | |
'field_data_', | |
'field_revision_', | |
); |
# Provides functions that help with scrolling | |
# ----------------------------------------------------------------------------- | |
Ok.ScrollHelpers = { | |
# Check if an element has a scrollbar. | |
checkScroll: (element, dir) -> | |
if dir == 'horizontal' | |
# Half pixels on innerWidth get rounded down. Better way to handle this? | |
return element.prop('scrollWidth') > (element.innerWidth() + 1) | |
else | |
return element.prop('scrollHeight') > element.innerHeight() |
const fs = require("fs"); | |
module.exports = (args) => { | |
return (data) => { | |
let json = null; | |
// Include the JSON, throw a log and exit if it wasn't JSON / bad path. | |
try { | |
json = require(args.path); | |
if (!json || json.constructor != Object) { |
0xdbbf1a39bf68a269ce4fe6fd24299afb94df86e6 |
When starting a new project with a Postgres database, you'll want to do the following things to set it up:
Depending on which operating system you're on, you'll need to do the following:
psql --username=postgres
, enter the password you made for postgres