Skip to content

Instantly share code, notes, and snippets.

Working from home

Héctor F. Jiménez. h3ct0rjs

Working from home
View GitHub Profile
View change.sh
sudo chown -R www-data.www-data /var/www/travel_list/storage
sudo chown -R www-data.www-data /var/www/travel_list/bootstrap/cache
@h3ct0rjs
h3ct0rjs / grafana custom.ini
Last active Apr 14, 2020 — forked from rrichards/grafana custom.ini
nginx config for using grafana, Influxdb via reverse proxy with authentication
View grafana custom.ini
# The full public facing url
#root_url = %(protocol)s://%(domain)s:%(http_port)s/
root_url = http://localhost:80/grafana/
@h3ct0rjs
h3ct0rjs / networkCommand.md
Created Dec 3, 2019 — forked from raulmoyareyes/networkCommand.md
Linux command to check Internet connection speed.
View networkCommand.md

# View public IP

  • curl -s checkip.dyndns.org | sed 's#.Address: (.)</b.*#\1#'
  • wget -qO - icanhazip.com
  • curl ifconfig.me
  • curl ident.me
  • dig +short myip.opendns.com @resolver1.opendns.com
  • lynx -dump ifconfig.me | grep 'IP Address'
  • curl ipecho.net/plain
  • curl bot.whatismyipaddress.com
  • curl ipinfo.io
@h3ct0rjs
h3ct0rjs / Backup-Postgres.ps1
Created Nov 6, 2019 — forked from stefanprodan/Backup-Postgres.ps1
PostgreSQL cluster base backup automation made easy with PowerShell and Windows Task Scheduler or PgAgent. This script does the following: checks if there is enough free space to make a new backup (based on the last backup size), purges expired backups, creates a new folder for each backup, calls pb_basebackup to begin a tar gzip backup of every…
View Backup-Postgres.ps1
#############################################
##
## PostgreSQL base backup automation
## Author: Stefan Prodan
## Date : 20 Oct 2014
## Company: VeriTech.io
#############################################
# path settings
$BackupRoot = 'C:\Database\Backup';
@h3ct0rjs
h3ct0rjs / Backup-Postgres.ps1
Created Nov 6, 2019 — forked from stefanprodan/Backup-Postgres.ps1
PostgreSQL cluster base backup automation made easy with PowerShell and Windows Task Scheduler or PgAgent. This script does the following: checks if there is enough free space to make a new backup (based on the last backup size), purges expired backups, creates a new folder for each backup, calls pb_basebackup to begin a tar gzip backup of every…
View Backup-Postgres.ps1
#############################################
##
## PostgreSQL base backup automation
## Author: Stefan Prodan
## Date : 20 Oct 2014
## Company: VeriTech.io
#############################################
# path settings
$BackupRoot = 'C:\Database\Backup';
@h3ct0rjs
h3ct0rjs / Backup-Postgres.ps1
Created Nov 6, 2019 — forked from stefanprodan/Backup-Postgres.ps1
PostgreSQL cluster base backup automation made easy with PowerShell and Windows Task Scheduler or PgAgent. This script does the following: checks if there is enough free space to make a new backup (based on the last backup size), purges expired backups, creates a new folder for each backup, calls pb_basebackup to begin a tar gzip backup of every…
View Backup-Postgres.ps1
#############################################
##
## PostgreSQL base backup automation
## Author: Stefan Prodan
## Date : 20 Oct 2014
## Company: VeriTech.io
#############################################
# path settings
$BackupRoot = 'C:\Database\Backup';
@h3ct0rjs
h3ct0rjs / README.rst
Created Aug 22, 2019 — forked from offlinehacker/README.rst
Script that learns openvpn hostnames from cert CN filed
View README.rst

ovpn-learnaddress

openvpn learn-address script to manage a hosts-like file

  • intended to allow dnsmasq to resolve openvpn clients
  • written for openwrt (busybox), but should work most anywhere

How it works?

View performance.md

Generally databases are best for data and the file system is best for files. It depends what you're planning to do with the image though.

If you're storing images for a web page then it's best to store them as a file on the server. The web server will very quickly find an image file and send it to a visitor. Sending files to visitors is the main job of a web server.

If you were to store the same image in a database then the amount of steps to get to this image is greatly increased so the image will be slower to download. Also it will use up more server resources. The web server will have to connect to the database and then query the database to get the image, download the image from the database and then send the visitor the image.

This will also tie up the database a little bit while it sends the image. It might not be a problem if your web site is not high traffic but as soon as you start getting a lot of visitors then you'll quickly notice the slowness. Storing files isn't really what databases were mad

@h3ct0rjs
h3ct0rjs / learning-path.md
Created Apr 17, 2019
You can do more good by being good than any other way. run from being good. Chase being great.
View learning-path.md

Learning Path Nodejs

Because being good at something depends only on you, discipline, automativation and hard study, obviously this can not be done if you don't have the proper support ❤️

This is a list of the things that I'm studying to become proeficient in nodejs and some framework(not decided yet but possible vue) stack development.

  • JavaScript concept Review(3weeks, 4hrs daily):
    • Control Flow
    • Loops
    • Datastructures Object manipulation
View notes-node.md

Notes

nodejs owns global objects as the following in javascript:

console.log()

setTimeOut() # set a timer delay in the client, server, browser
clearTimeOut()
You can’t perform that action at this time.