Skip to content

Instantly share code, notes, and snippets.

@AlamShariful
AlamShariful / Kernel Build Instructions
Created November 15, 2024 05:46
Kernel Build instructions:
# For Debian/Ubuntu
sudo apt-get update
sudo apt-get install build-essential libncurses-dev bison flex libssl-dev libelf-dev bc git
Get into the kernel source code
make clean
$Configure the Kernel
cp /boot/config-$(uname -r) .config
@AlamShariful
AlamShariful / aes-ni.c
Created July 15, 2020 02:07 — forked from acapola/aes-ni.c
AES128 how-to using GCC and Intel AES-NI
#include <stdint.h> //for int8_t
#include <string.h> //for memcmp
#include <wmmintrin.h> //for intrinsics for AES-NI
//compile using gcc and following arguments: -g;-O0;-Wall;-msse2;-msse;-march=native;-maes
//internal stuff
//macros
#define DO_ENC_BLOCK(m,k) \
do{\
@AlamShariful
AlamShariful / cheat_sheet.txt
Created March 24, 2019 23:28
GDB cheat sheet
GDB commands by function - simple guide
---------------------------------------
More important commands have a (*) by them.
Startup
% gdb -help print startup help, show switches
*% gdb object normal debug
*% gdb object core core debug (must specify core file)
%% gdb object pid attach to running process
% gdb use file command to load object
@AlamShariful
AlamShariful / min-char-rnn.py
Created August 22, 2018 08:55 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@AlamShariful
AlamShariful / README.md
Created October 8, 2017 21:34 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@AlamShariful
AlamShariful / js.md
Created August 25, 2017 14:31 — forked from nuhil/js.md
Javascript Handbook

Javascript Handbook

A hand crafted markdown document contains all major Javascript topics covered, taken from different sources. Brush Up your JS memory.

Comments


Single line comments start with //. For multi-line commands, you use /* ... */

// This is a single line comment
<?php
/**
* @dependency Zend/Json.php - http://framework.zend.com/
*
* This file is modifying JSON-RPC PHP which depends on `Zend/Json.php`.
* The original file - http://jsonrpcphp.org/
*/
require_once('Zend/Json.php');
@AlamShariful
AlamShariful / gist:47b7daaa37641a8fd936beab825aff6e
Created April 11, 2017 06:56
Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu
Step 1: Install Apache
sudo apt-get update
sudo apt-get install apache2
Step 2: Install MySQL
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
During the installation, MySQL will ask you to set a root password. If you miss the chance to set the password while the program is installing, it is very easy to set the password later from within the MySQL shell.
Step 3: Install PHP
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
@AlamShariful
AlamShariful / calendar.css
Created March 3, 2017 05:59
Modern Calendar Class written in Php
/*************************** Calendar Top Navigation **************************/
#calendar {
margin: 0px auto;
padding: 0px;
width: 602px;
font-family: Helvetica, "Times New Roman", Times, serif;
}
#calendar .calendar_box {
position: relative;
top: 0px;