pip install netifaces
netifaces.ifaddresses(netifaces.gateways()['default'][netifaces.AF_INET][1])[netifaces.AF_LINK][0]['addr']
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let webpack = require('webpack'); | |
let path = require('path'); | |
module.exports = { | |
entry: { | |
app: './resources/assets/js/app.js', | |
vendor: ['vue', 'axios'] | |
}, | |
output: { |
let path = require('path');
let glob = require('glob')
let webpack = require('webpack');
let { CleanWebpackPlugin } = require('clean-webpack-plugin');
let HtmlWebpackPlugin = require('html-webpack-plugin');
let inProduction = process.env.NODE_ENV === 'production'
let PurgecssPlugin = require('purgecss-webpack-plugin')
let MiniCssExtractPlugin = require('mini-css-extract-plugin')
usr=`awk -F: '{ print $1}' /etc/passwd`
usr=`getent passwd|grep -v 'root'|awk '/home/'| awk -F: '{ print $1}'`
for user in $(echo $usr); do if [ $user != `whoami` ];then sudo userdel -r $user; fi; done
stale=`ps aux |grep ssh |egrep -v 'root'| awk '{print $2}'`
for process in $stale;do sudo pkill -9 $process;done
cat ~/.ssh/id_rsa.pub | ssh username@remote_host "mkdir -p ~/.ssh && touch ~/.ssh/authorized_keys && chmod -R go= ~/.ssh && cat >> ~/.ssh/authorized_keys"
sudo systemctl restart ssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//helpers | |
function flush(){ | |
SpreadsheetApp.flush(); | |
} | |
function get_cuurent_sheet_name() { | |
var key = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().getName(); | |
return key; | |
} | |
function back_to_dashboard(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This script is provided by Ahmed Shehab<[email protected]> under BSD License | |
//helpers | |
function flush(){ | |
SpreadsheetApp.flush(); | |
} | |
function get_cuurent_sheet_name() { | |
var key = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().getName(); | |
return key; |
- Create a private key (as Root CA Key), keep this very private
- Self-sign a root certificate
- Install root CA on your various workstations
- Create a CSR(Certificate Signing Request) for each of your authorized needed circumstances(device, server, client, etc.)
- Sign CA with root CA Key
# generate a signing key
""" params:
- scale: int 2.2>scale>0
- img_array: list or tuple of opencv mat img and string label (matImg,"mat-img" )
- columns: int:optional - acts as manual override to control how many columns you want to display the number of images you sent, defaults to 4 and does some calculations for assumpions.
Usage: cv2.imshow("stacked", stack_images(1.2, (img, "img-label")))
OlderNewer