Skip to content

Instantly share code, notes, and snippets.

View jodevsa's full-sized avatar
🏋️

Subhi Al Hasan jodevsa

🏋️
  • Germany
View GitHub Profile

Keybase proof

I hereby claim:

  • I am jodevsa on github.
  • I am jdv (https://keybase.io/jdv) on keybase.
  • I have a public key ASARvfTwCrWvzm-T0yceIotCz35bfBBO_xBdSebASPV8Mwo

To claim this, I am signing this object:

const cookie = require('cookie-signature');
const uid = require('uid-safe');
function SessionMiddleWare(cookieKey, cookieLength, secretKey) {
const sessionStore = {}
const destroy = (key) => {
delete sessionStore[key];
}
return async (req, res, next) => {
@jodevsa
jodevsa / .tmux.conf
Created April 7, 2017 15:48
my tmux config
# 0 is too far from ` ;)
#set -g base-index 1
#set shell
set -g default-shell /usr/bin/fish
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
alert(1)
'use strict'
const express = require('express');
const path = require('path');
let app = express();
let port=8080;
let pdfFilesLocation='/home/jodevsa/pdf_streamer/public/pdf/';
app.use(express.static(path.join(__dirname, 'public/ViewerJS')));
app.use(express.static(path.join(pdfFilesLocation)));
app.listen(port);
console.log("streaming on port:"+port);
@jodevsa
jodevsa / index.js
Last active October 10, 2016 00:39
simple request wrapper to add proxy settings
//rename index.js file to core.js
//and create a new index.js with this content
const request=require('./core.js');
/////////////////////////////
//enable/disable wrapper
const ON=true;
//proxy settings
const proxyLoc='http://localhost:8080';

Keybase proof

I hereby claim:

  • I am jodevsa on github.
  • I am jdv (https://keybase.io/jdv) on keybase.
  • I have a public key ASAcszz1KLraLE1Phzn37bk6n3S-YZ2BUcRX08XA4pVnvAo

To claim this, I am signing this object: