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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Image Checkboxes</title> | |
<style> | |
body { | |
font-family: sans-serif; | |
margin: 20px; |
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
cat > start.sh | |
while true; do { echo -e 'HTTP/1.1 200 OK\r\n'; sh server.sh; } | nc -l 8081; done | |
cat > server.sh | |
#!/bin/bash | |
response=`cat response.json` | |
echo "$response" | |
cat > response.json | |
Hello World |
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
package main | |
// usage: compile and create static-https-file-server.exe | |
// set env variables TLSSERVERPORT FILESERVERDIR TLSSERVERCERT TLSSERVERKEY as the names imply | |
// cmd : | |
// TLSSERVERPORT=<fill> \ | |
// FILESERVERDIR="<fill>" \ | |
// TLSSERVERCERT="<fill>" \ | |
// TLSSERVERKEY="<fill>" \ | |
// ./static-https-file-server.exe |
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
// create a self signed tomcat to be used with tomcat | |
//generate a private key | |
openssl genrsa -des3 -out tomcat.key 4096 | |
//generate a acert | |
openssl req -new -key tomcat.key -out tomcat.csr | |
//generate cert and key pair | |
//openssl req -x509 -nodes -sha256 -newkey rsa:2048 -keyout tomcat.key -out tomcat.crt |
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
const crypto = require('crypto'); | |
const path = require("path"); | |
const fs = require("fs"); | |
const encryptStringWithRsaPublicKey = function(toEncrypt, relativeOrAbsolutePathToPublicKey) { | |
const absolutePath = path.resolve(relativeOrAbsolutePathToPublicKey); | |
const publicKey = fs.readFileSync(absolutePath, "utf8"); | |
const encrypted = crypto.publicEncrypt(publicKey, Buffer.from(toEncrypt)); | |
return encrypted.toString("base64"); | |
}; |
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
const cluster = require('cluster'); | |
if(cluster.isMaster){ | |
function test(num){ | |
let workers = {}; | |
let count = num; | |
for (let i = 0; i < num; i++) { | |
workers[i] = []; | |
workers[i].push((new Date).getTime()); | |
const worker = cluster.fork(); |
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
#!/bin/bash | |
set -e | |
# set -x | |
function log(){ | |
echo "$(date -u +'%Y%m%dT%H%M%SZ') - $*" | |
} | |
# variable declaration - start | |
bucket=<bucket> |
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
V2V Intersection Collision Warning (ICW) Dec 2016 | |
• We built an v2v communication framework to add applications that are related to driver assistance and autonomous driving. | |
• Apps like automatic emergency braking, lane-following, automated lane changing can be added on this framework. We implemented Intersection collision warning system to demonstrate the working of the framework. | |
• Sensor fusion of compass and GPS module to eliminate any glitches in the positioning reported by GPS module. | |
• The ICW system which is demonstrated in the below YouTube link, is an important active safety feature in autonomous driving. It is driver assistance system which warns driver when there is a probability of collision. | |
• Can detect Intersection Collision Warning, predict collision time and warn the driver accordingly. | |
• Code repo at GitHub: https:/github.com/saii9/Vehicle-Comn-nrf | |
• YouTube Link: https://www.youtube.com/watch?v=roOfH7tUPEg |
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
#to check SysV services | |
chkconfig --list | more | |
#To check systemd service files | |
systemctl list-unit-files | |
systemctl list-units | |
systemd | |
___________|___________ | |
| | | |
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
sudo apt-get install libncurses5-dev libncursesw5-dev unzip lzop u-boot-tools | |
#in a clean working directory donwload busybox | |
wget https://busybox.net/downloads/busybox-1.28.3.tar.bz2 | |
tar xvjf busybox-1.28.3.tar.bz2 | |
#downlaod linaro toolchain | |
wget https://releases.linaro.org/components/toolchain/binaries/latest/arm-linux-gnueabihf/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz | |
tar xvf gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz | |
#downlaod linux kernel source |
NewerOlder