Skip to content

Instantly share code, notes, and snippets.

View akilawickey's full-sized avatar

Akila Wickey akilawickey

View GitHub Profile
@akilawickey
akilawickey / app.js
Last active March 11, 2018 08:40
Adding a ssl on nginx with nodejs application
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var exphbs = require('express-handlebars');
var router = express.Router();
var index = require('./routes/index');
@akilawickey
akilawickey / Autoupdating Server from Git.md
Last active January 18, 2018 11:30
Autoupdating Server from remote GitHub repository periodically

First you generate ssh key in the server

  1. ssh-keygen -t rsa -b 4096 -C "asak999@gmail.com"
  2. Uploading this public key to deploy keys in GitHub
  3. Then you create /home/user/.ssh/config file
  4. Then you clone repository with git clone https://github.com/akilawickey/akilawickey.github.io.git
  5. create a bash file as sync.sh
  6. Give privilages to the script by chmod +x sync.sh
  7. And then put it in cronjob to make it happen peroidly
  8. just go to terminal and type crotab -e and edit it as following structure
@akilawickey
akilawickey / Documentation
Last active June 25, 2017 04:59
zebkit packages inside gdp and building process
This is the steps how to include zebkit recipes to gdp and build a target to run the zebra
https://github.com/GENIVI/genivi-dev-platform.git
cd genivi-dev-platform
source init.sh qemux86-64
cd ../meta-genivi-dev/meta-genivi-dev/
wget https://github.com/akilawickey/meta-genivi-dev/commit/94f5427aaffea0a141547697b1da203463545353.patch
git am -i *.patch
#Edit the genivi-dev-platform.bb using nano
nano recipes-dev-platform/images/genivi-dev-platform.bb
@vinhkhuc
vinhkhuc / simple_mlp_tensorflow.py
Last active December 22, 2021 11:52
Simple Feedforward Neural Network using TensorFlow
# Implementation of a simple MLP network with one hidden layer. Tested on the iris data set.
# Requires: numpy, sklearn>=0.18.1, tensorflow>=1.0
# NOTE: In order to make the code simple, we rewrite x * W_1 + b_1 = x' * W_1'
# where x' = [x | 1] and W_1' is the matrix W_1 appended with a new row with elements b_1's.
# Similarly, for h * W_2 + b_2
import tensorflow as tf
import numpy as np
from sklearn import datasets
from sklearn.model_selection import train_test_split
@Iman
Iman / clean.sh
Last active April 15, 2024 16:50
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/bin/sh
#Check the Drive Space Used by Cached Files
du -sh /var/cache/apt/archives
#Clean all the log file
#for logs in `find /var/log -type f`; do > $logs; done
logs=`find /var/log -type f`
for i in $logs
@julionc
julionc / 00.howto_install_phantomjs.md
Last active February 21, 2024 11:01
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev