Skip to content

Instantly share code, notes, and snippets.

View isstaif's full-sized avatar

al-Amjad Tawfiq Isstaif isstaif

View GitHub Profile
@isstaif
isstaif / openssl.sh
Last active December 28, 2015 04:59
Generating a certificate using openssl
#generate private key
openssl genrsa -out private-key.pem 4096
#generate signing request
openssl req -new -key private-key.pem -out certificate-signing-request.pem
#self sign the request (or send off the Verisign etc etc)
openssl x509 -req -in certificate-signing-request.pem -signkey private-key.pem -out certificate.pem
#extract public key out of the certificate
@isstaif
isstaif / client.js
Last active June 9, 2016 21:09
TCP public chat, Node.js
var net = require('net')
, encryption = require('./../encryption')
, ursa = require('ursa')
, exec = require('child_process').exec
, fs = require('fs')
, sh = require('execSync')
var stdin = process.openStdin()
var username, password, connection, privateKey, publicKey, otherPublicKey = false, userNames = [], certificate = false, myId, isNew = true
@isstaif
isstaif / hello.html
Last active August 29, 2015 14:15
Javascript hello
<html>
<head>
<title>Hello, World!</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js" ></script>
</head>