- Open your browser and go to https://twitter.com/[your-username]/likes
- copy the code below and paste it in your browser console
function sleep() {
console.log('sleeping for 1 sec');
}
let nIntervId;
| user nginx; | |
| worker_processes auto; | |
| worker_cpu_affinity auto; | |
| # Change the default thread pool settings | |
| thread_pool default threads=2 max_queue=16384; | |
| error_log /var/log/nginx/error.log notice; | |
| pid /var/run/nginx.pid; | |
| events { |
| import json | |
| import os | |
| import time | |
| import webbrowser | |
| import sys | |
| import re | |
| def handleWindows(extra_seconds): | |
| print("OS : Windows") |
function sleep() {
console.log('sleeping for 1 sec');
}
let nIntervId;
| function int2ip (ipInt) { | |
| return ( (ipInt>>>24) +'.' + (ipInt>>16 & 255) +'.' + (ipInt>>8 & 255) +'.' + (ipInt & 255) ); | |
| } |
| { | |
| "extends": [ | |
| "airbnb", | |
| "eslint:recommended", | |
| "plugin:import/errors", | |
| "plugin:import/warnings" | |
| ], | |
| "plugins": [ | |
| "react" | |
| ], |
| function keepTrying(otherArgs, promise) { | |
| promise = promise||new Promise(); | |
| // try doing the important thing | |
| if(success) { | |
| promise.resolve(result); | |
| } else { | |
| setTimeout(function() { | |
| keepTrying(otherArgs, promise); |
| const application = await NestFactory.create(ApplicationModule); | |
| function availableRoutesString() { | |
| return application.httpAdapter.instance._router.stack | |
| .filter(r => r.route) | |
| .map(r => Object.keys(r.route.methods)[0].toUpperCase().padEnd(7) + r.route.path) | |
| .join("\n") | |
| } | |
| console.log(availableRoutesString()); |
TL;DR
Install Postgres 9.6, and then:
sudo pg_dropcluster 9.6 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main| import java.util.*; | |
| class ReverseString { | |
| public static void main(String[] args) { | |
| String s = "Hello world!"; | |
| String[] arr = s.split(""); | |
| List<String> list = Arrays.asList(arr); | |
| Collections.reverse(list); | |
| Object[] ar = list.toArray(); | |
| s = Arrays.toString(ar); |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm