Categories
Development System & Network

VPN via raspberry Pi

So, i next setup. Laptop (Master PC) Server with OpenVPN a lot of clients(Slave Pc) which connects to another pc (with static ip) Goal is to make virtual network, that i can reach (remote another pc) from my master laptop.

Categories
Development System & Network

Terminal command to show a specific line extract from the output, along with the full output

I have a build command that outputs a lot of content, and within it, there’s a link that I need to copy & paste. So I’d like to be able to do some terminal acrobatics so that this command does the normal full output, but in the end, but that line with the link is […]

Loading css from cgit on nginx in a subdirectory

before I start I should note that I have absolutely no experience with nginx or networking, so what I have done was thanks to searching and trying different solutions. I have a problem I struggle with for 1 hour now. I’m trying to setup cgit on nginx so that it’ll be accessible though subdirectory, like […]

Categories
Development System & Network

Is there any way to locate *previously repaired* malformed/corrupt files?

We have a user profile share 12TB with redirected folders. I’ve noticed on a few occasions .JPG files that are corrupt (won’t open) and state they are 1.4GB in size. We are struggling with some issues like failed backup restores and shadow copies disappearing in the middle of a restore. I have a feeling these […]

Categories
CMS Development Wordpress

Why do menus break on site url and folder change?

I just moved a site over from an old domain to a new domain (this means the server-side folder changes too). I replaced all instances of the old domain in the database with the new domain and couldn’t find any instances of the directory name. I checked that nowhere in the database the old domain […]

Categories
Development

convert Qt Designer project into C++ code

I converted my .ui file via uic into a header file, which, as far as I know, contains the header AND the implementation of the .ui file. But what part of it is the header and what is the implementation? Is there a way to seperate them properly? #ifndef PATCHBOT_GUI_H #define PATCHBOT_GUI_H #include <QtCore/QVariant> #include […]

Categories
Development

All possible combination of summation of vectors in R

I have 3 vectors, A, B, C. They all have the same number of rows. What I am looking for is the all possible combination of summation of vectors. For this example, I want to have A+B, A+C, B+C, and A+B+C. Is there any command/package in R that can do that? In another words, I […]

Categories
Development

upload image using vue js with form text fields

I started working on small project using Vue Js and I would like to add an upload file option in my contact form, I use serialize for the form because I have a lot of input text fields. but it doesn’t work with append function. How can I add upload file to my serialized form […]

Categories
Development

How to extend all Sequelize Models?

I added several Sequelize extension methods, db-ext.js: module.exports = { findResult: (filter, col = ‘id’) => { filter.raw = true; return this.findOne(filter).then(row => { if (!row) return null; return row[col] || null; }) }, … }; then, in the models/index.js, I would like to add those methods to all the models: … let sequelize; if […]

Categories
Development

How can I add one of two random numbers to each row of a csv proportionately?

I have a csv that contains 100 rows by three columns of random numbers: 100, 20, 30 746, 82, 928 387, 12, 287.3 12, 47, 2938 125, 198, 263 … 12, 2736, 14 In bash, I need to add another column that will be either a 0 or a 1. However, (and here is the […]