cp -R ./src/. ./
e.g.
src/
file1
folder/
file2
file3
becomes
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} |
cp -R ./src/. ./
e.g.
src/
file1
folder/
file2
file3
becomes
let characterResponse = await fetch(‘<http://swapi.co/api/people/2/>’) | |
let characterResponseJson = await characterResponse.json() | |
let films = await Promise.all( | |
characterResponseJson.films.map(async filmUrl => { | |
let filmResponse = await fetch(filmUrl) | |
return filmResponse.json() | |
}) | |
) | |
console.log(films) |
I hereby claim:
To claim this, I am signing this object:
<?php | |
/** | |
* Retrieve a page given its slug. | |
* | |
* @global wpdb $wpdb WordPress database abstraction object. | |
* | |
* @param string $page_slug Page slug | |
* @param string $output Optional. Output type. OBJECT, ARRAY_N, or ARRAY_A. | |
* Default OBJECT. | |
* @param string|array $post_type Optional. Post type or array of post types. Default 'page'. |
sudo apt-get install libicu-dev | |
cd /tmp | |
# Install depot_tools first (needed for source checkout) | |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
export PATH=`pwd`/depot_tools:"$PATH" | |
# Download v8 | |
fetch v8 |
.photo-of-the-day { | |
$root: &; | |
&--title{ | |
font-size: 16px; | |
} | |
&:hover{ | |
#{$root}--title { | |
text-decoration: underline; | |
} | |
} |
zend_extension=xdebug.so | |
xdebug.remote_enable = 1 | |
xdebug.remote_connect_back = 1 | |
xdebug.idekey = "PHPSTORM" | |
xdebug.remote_handler = "dbgp" | |
xdebug.remote_port = 9000 |
$arr = array(...); | |
usort($arr, function($a, $b) { | |
$ad = new DateTime($a['dateTime']); | |
$bd = new DateTime($b['dateTime']); | |
if ($ad == $bd) { | |
return 0; | |
} |
if (!$("input[name='html_elements']:checked").val()) { | |
alert('Nothing is checked!'); | |
} | |
else { | |
alert('One of the radio buttons is checked!'); | |
} |