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
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
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.
#hfjimenez@utp.edu.co | |
#Create user with pass and add it to the admin group. | |
$Username =Read-Host -Prompt 'Username for windows Account' | |
$Pass = Read-Host -AsSecureString -Prompt 'Enter your password' | |
New-LocalUser $Username -Password $Pass -FullName "Automatic" -Description "Admin User" | |
Add-LocalGroupMember -Group "Administrators" -Member $Username | |
{ | |
"List comprehension": { | |
"prefix": "lc", | |
"body": "[${1:value} for ${2:value} in ${3:iterable}]$0", | |
"description" : "list comprehension for creating a list based on existing lists" | |
}, | |
"List comprehension if else": { | |
"prefix": "lcie", | |
"body": "[${1:value} if ${2:condition} else ${3:condition} for ${4:value} in ${5:iterable}]$0", | |
"description" : "list comprehension for creating a list based on existing lists, with conditional if else statement" |
from src.utils import Database | |
struct = {} | |
def main(): | |
struct['host'] = input('Ingrese el hostname: ') | |
struct['port'] = input('Ingrese el puerto ') | |
struct['dbname'] = input('Ingrese el dbname ') | |
struct['user'] = input('Ingrese el user') | |
struct['password'] = input('Ingrese el password') | |
#print(struct) #debug |
In this week we're going to reinforce a few concepts and improve the tool usage. Your task this week is do the following:
one for vscode.
You can use code samples from internet or your own python scripts. check this out
//Client implementation. | |
const WebSocket = require('ws') | |
const data = '*GS06,358077090893138,151701291218,,SYS:SP4603NS;V2.31;V1.1.8,GPS:A;12;N6.041337;W75.412624,COT:60855,ADC:11.59;3.73,DTT:0;E0;;;0;1#'; | |
const io = require('socket.io-client'); | |
const reconnectInterval = 10 * 1000 * 60; | |
const connect = (dato) =>{ | |
let timestamp = Math.floor(Date.now() /1000); //epoch unix. | |
const url = 'http://127.0.0.1:5000' | |
try { |