This file contains hidden or 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 bash | |
# A script to download a file and verify its size against the server's reported content-length. | |
# The script uses getopts for proper argument parsing. | |
usage() { | |
echo "Usage: $0 -u <URL> -p <path>" >&2 | |
echo " -u URL of the file to download." >&2 | |
echo " -p Local path and filename to save the file as." >&2 | |
return 1 |
This file contains hidden or 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 bash | |
mkdir -p ~/config/etc/php/8.0/fpm/conf.d/ | |
touch ~/config/etc/php/8.0/fpm/conf.d/20-xdebug.ini | |
cat > ~/config/etc/php/8.0/fpm/conf.d/20-xdebug.ini <<EOL | |
zend_extension=xdebug.so | |
xdebug.mode = debug | |
xdebug.client_host = 127.0.0.1 | |
xdebug.client_port = 9003 |
This file contains hidden or 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
eslint --no-config-lookup --rule "no-console: error" having_inline_rule_enabled.js | |
1:1 error Unexpected console statement no-console | |
1:13 error Strings must use doublequote quotes | |
5:33 error Strings must use doublequote quotes | |
✖ 3 problems (3 errors, 0 warnings) | |
2 errors and 0 warnings potentially fixable with the `--fix` option. |
This file contains hidden or 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 customEventHandling = () => { | |
document.addEventListener('this-is-my-custom-event', (event) => { | |
console.log('THIS SHOULD PRINT ON DISPATCHED EVENT!'); | |
console.log(event) | |
}); | |
document.onreadystatechange = () => { | |
if (document.readyState !== "complete") { | |
console.log('not ready yet'); |
This file contains hidden or 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
yarn install | |
yarn install v1.19.1 | |
[1/4] Resolving packages... | |
[2/4] Fetching packages... | |
info [email protected]: The platform "linux" is incompatible with this module. | |
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. | |
[3/4] Linking dependencies... | |
[4/4] Building fresh packages... | |
[-/6] ⠄ waiting... | |
[-/6] ⠄ waiting... |
This file contains hidden or 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
{ | |
"name": "jest-test", | |
"version": "1.0.0", | |
"lockfileVersion": 1, | |
"requires": true, | |
"dependencies": { | |
"@babel/code-frame": { | |
"version": "7.5.5", | |
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", | |
"integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", |
This file contains hidden or 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
highland(range).map((i) => { | |
return highland(createPromise(i)); | |
}) | |
.flatten() | |
.errors((error, push) => { | |
if (error) { | |
push(null, null); | |
} | |
}) | |
.compact() |
This file contains hidden or 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
package com.dreamlines.commons | |
import scala.concurrent.{ExecutionContext, Future} | |
/** | |
* This LazyFuture helps working with futures with concurrency | |
* | |
* @param f | |
* @tparam A | |
*/ |
This file contains hidden or 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 akka.actor.ActorSystem | |
import akka.http.scaladsl.Http | |
import akka.http.scaladsl.model._ | |
import akka.stream.Materializer | |
import akka.util.ByteString | |
import org.json4s._ | |
import org.json4s.native.JsonMethods._ | |
import scala.concurrent.duration._ | |
import scala.concurrent.{ExecutionContext, Future} |
This file contains hidden or 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
FROM ubuntu:16.04 | |
ARG DEBIAN_FRONTEND=noninteractive | |
RUN apt-get -qq update | |
RUN apt-get -qq install software-properties-common > /dev/null | |
RUN apt-add-repository ppa:git-core/ppa > /dev/null | |
RUN apt-get -qq update && apt-get -qq install python3-pip curl vim net-tools bash | |
ADD https://deb.nodesource.com/setup_8.x nodesetup.sh | |
RUN bash ./nodesetup.sh | |
RUN apt-get -qq install nodejs | |
RUN node -v |
NewerOlder