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 "[email protected]"
  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 June 9, 2025 19:00
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 November 1, 2025 09:26
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/usr/bin/env bash
# Ubuntu Server or VM Cleaner. Safe by default; aggressive when asked.
# Example safe: sudo ./clean.sh
# Example aggressive: sudo JOURNAL_DAYS=3 AGGRESSIVE=1 ./clean.sh
# Enable Docker image prune (images only): sudo ./clean.sh --docker-images
# Tested on Ubuntu 20.04, 22.04, 24.04 (server/VM images).
set -Eeuo pipefail
trap 'rc=$?; echo "Error on line $LINENO: $BASH_COMMAND (exit $rc)"; exit $rc' ERR
IFS=$'\n\t'
@julionc
julionc / 00.howto_install_phantomjs.md
Last active August 31, 2025 01:22
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