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 SECONDS = 1000 | |
const MINUTES = 60 * SECONDS | |
const HOURS = 60 * MINUTES | |
const DAYS = 24 * HOURS | |
function convertTime(duration: number) { | |
const [days, daysReminder] = integerDivide(duration, DAYS) | |
const [hours, hoursReminder] = integerDivide(daysReminder, HOURS) | |
const [minutes, minutesReminder] = integerDivide(hoursReminder, MINUTES) | |
const [seconds, milliseconds] = integerDivide(minutesReminder, SECONDS) |
I hereby claim:
- I am frosas on github.
- I am francescrosas (https://keybase.io/francescrosas) on keybase.
- I have a public key ASDw-vcswIVm61yGBo5LiHGWgIavJt4xk6eTzlNWN9n-Jwo
To claim this, I am signing this object:
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
2a3,5 | |
> | |
> Download as a PDFhere | |
> | |
53c56 | |
< You can check all payments into and out of your account through the Revolut app. We will not make any changes to your account information and it will be available to you through the Revolut app for six years after you close your account. If you need to keep a copy of the information after then, you will need to download it. You can download information from the app at any time. | |
--- | |
> You can check all payments into and out of your account through the Revolut app. We will not make any changes to your account information. It will be available to you through the Revolut app while you are a customer. It will also remain available through the Revolut app for six years after you close your account. If you need to keep a copy of the information after then, or if you need to keep a copy of it outside of the app, you will need to download it. You can download this information from the app at any time. | |
131c134 | |
< Email us on feedback@revolut.com or formalcomplaints@revolut.co |
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 setupGlobalDom = () => { | |
const originalDocument = global.document; | |
const originalWindow = global.window; | |
global.document = jsdom(''); | |
global.window = global.document.defaultView; | |
return () => { | |
global.document = originalDocument; | |
global.window = originalWindow; | |
} | |
} |
(assuming an Ubuntu machine)
- Install perf:
sudo apt-get install linux-tools-generic
- Run
perf
and install any other listed missing package: (e.g.)sudo apt-get install linux-tools-4.4.0-1022-aws linux-cloud-tools-4.4.0-1022-aws
- Enable symbols mapping when running the Node process:
node --perf-basic-prof ...
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
// Shows only the most replied comments in https://news.ycombinator.com post and | |
// comment pages. | |
(() => { | |
const INDENT_WIDTH = 12; // TODO Detect it automatically? | |
class CommentTreeNode { | |
constructor(attrs) { | |
this.children = []; |
# Make sure we have an up to date node/npm
NODE_VERSION="v0.10.22"
if [[ $(echo -e "$NODE_VERSION\n$(node -v)" | sort -n | tail -n1) == $NODE_VERSION ]]; then
NODE_DIR=node-$NODE_VERSION-linux-x86
wget -q http://nodejs.org/dist/$NODE_VERSION/$NODE_DIR.tar.gz -O - | tar xzf -
export PATH=$(cd ./$NODE_DIR/bin && pwd):$PATH
fi
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
<?php | |
namespace Acme\Bundle; | |
use Doctrine\Bundle\DoctrineBundle\ConnectionFactory; | |
use Doctrine\Common\EventManager; | |
use Doctrine\DBAL\Configuration; | |
class PerProcessConnectionFactory extends ConnectionFactory | |
{ |
NewerOlder