I hereby claim:
- I am valentinvieriu on github.
- I am valentin_v (https://keybase.io/valentin_v) on keybase.
- I have a public key whose fingerprint is 39AE A0F2 A885 A843 7BCE 36CC BDD4 2561 0960 69F1
To claim this, I am signing this object:
#!/bin/bash | |
width=60; | |
height=60; | |
x_offset=10; | |
y_offset=5; | |
filelist=`ls | grep '.jpg'` | |
for image_file in $filelist | |
do | |
preextensionfilename=`convert $image_file -format "%t" info:` | |
convert $image_file -crop ${width}x${height}+${x_offset}+${y_offset} \ |
I hereby claim:
To claim this, I am signing this object:
const request = function request(reqUrl,options = {}) { | |
// parse url to chunks | |
reqUrl = url.parse(reqUrl); | |
// http.request settings | |
let settings = { | |
protocol: reqUrl.protocol, | |
host: reqUrl.hostname, | |
path: reqUrl.path, | |
port: reqUrl.port ? reqUrl.port : (reqUrl.protocol === 'https:' ? 443 : 80), | |
headers: { |
const axios = require('axios'); | |
function random(min, max) { | |
return (Math.random() * ((max ? max : min) - (max ? min : 0) + 1) + (max ? min : 0)) | 0; | |
} | |
function wait(promise) { | |
const seconds = random(300, 2000); | |
return new Promise((resolve, reject) => { | |
setTimeout(() => resolve(promise()), seconds); |
/var/lib/postgresql/data/
as a volumedocker exec tools_postgres_1 bash -c "pg_dump --username=postgres --no-password --format=t db_name | gzip > /var/lib/postgresql/data/backup/backup_local_$(date +%Y-%m-%d).tar.gz"
docker exec tools_postgres_1 bash -c "pg_restore --username=postgres --no-password --dbname=db_name --verbose /var/lib/postgresql/data/backup/backup_local_29-01-2017.tar.gz"
/** | |
* camelCaseToDash('userId') => "user-id" | |
* camelCaseToDash('waitAMoment') => "wait-a-moment" | |
* camelCaseToDash('TurboPascal') => "turbo-pascal" | |
*/ | |
function camelCaseToDash (str) { | |
return str.replace(/([a-zA-Z])(?=[A-Z])/g, '$1-').toLowerCase() | |
} |
function uuidv4() { | |
return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c => | |
(c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16) | |
) | |
} |
// Allows random intervals that do not start with 1. So you can get a random number from 10 to 15 for example. | |
function randomIntFromInterval(min,max) | |
{ | |
return Math.floor( Math.random()* ( max - min + 1 ) + min ); | |
} |
/* | |
(c) by Thomas Konings | |
Random Name Generator for Javascript | |
*/ | |
function capFirst(string) { | |
return string.charAt(0).toUpperCase() + string.slice(1); | |
} | |
function getRandomInt(min, max) { |
(async function () { | |
const response = await fetch('https://cors-anywhere.herokuapp.com/https://www.domainsfortherestofus.com/'); | |
const text = await response.text(); | |
const parser = new DOMParser(); | |
const document = parser.parseFromString(text, 'text/html'); | |
const domain = document.querySelector("body > div.content > div > div > div.left-side > div.domain > a").text; | |
console.log('domain', domain); | |
})(); |