Skip to content

Instantly share code, notes, and snippets.

View arya-oss's full-sized avatar
💭
I may be slow to respond.

Rajmani Arya arya-oss

💭
I may be slow to respond.
View GitHub Profile
@arya-oss
arya-oss / config.json
Last active July 1, 2019 06:22
Automated script for Hadoop Installation
{
"hadoop_src":"hadoop-2.7.1.tar.gz",
"hadoop_folder": "hadoop-2.7.1",
"hadoop_path": "Softi/hadoop-2.7.1",
"__comment" : "hadoop_path with respect home folder",
"core": [
{
"name": "fs.default.name",
"value": "hdfs://localhost:54310"
}
@arya-oss
arya-oss / DES.py
Last active July 3, 2018 08:52
Data Encryption Standard
#!/usr/bin/env python
p_table_1 = [
[57,49,41,33,25,17, 9],
[ 1,58,50,42,34,26,18],
[10, 2,59,51,43,35,27],
[19,11, 3,60,52,44,36],
[63,55,47,39,31,23,15],
[ 7,62,54,46,38,30,22],
[14, 6,61,53,45,37,29],
@arya-oss
arya-oss / INSTALL.md
Last active November 18, 2023 13:58
Ubuntu 16.04 Developer Tools installation

Ubuntu 16.04 Developer Tools Installation

First things first !

sudo apt update
sudo apt upgrade

Standard Developer Tools

sudo apt-get install build-essential git
@arya-oss
arya-oss / substitution_cipher.md
Last active September 7, 2016 04:08
CNS Lab 4th day

Caesar Cipher

#include <bits/stdc++.h>
using namespace std;

#define SHIFT 3

int main(int argc, char * argv[]) {
    string str, crypt;
    cout << "Enter string: ";
@arya-oss
arya-oss / cns_modular_arithmetic.cpp
Created August 15, 2016 13:57
Calculate modulus of sum of to large integers with prime number
#include <iostream>
#include <string>
using namespace std;
int main () {
string num1, num2, res, len1;
cout << "Enter Number: "; cin >> num1;
cout << "Enter Number: "; cin >> num2;
int prime;
@arya-oss
arya-oss / 2048.cpp
Created August 14, 2016 20:10
2048 puzzle game
#include <bits/stdc++.h>
#include <unistd.h>
using namespace std;
int USER = 1;
int COMPUTER = 0;
#define LEFT 0
#define RIGHT 1
#define UP 2
@arya-oss
arya-oss / g++.sublime-build
Created April 11, 2016 16:43
C++ build option for sublime. create new build system and add following lines
{
"cmd": ["g++", "$file", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c",
"variants":
[
{
"name": "Run",
"shell": true,
@arya-oss
arya-oss / gcc.sublime-build
Created April 11, 2016 16:41
GCC build option for sublime. create new build system and add following lines
{
"cmd": ["gcc", "$file", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c",
"variants":
[
{
"name": "Run",
"shell": true,

Vim settings for ubuntu

  cd
  vi .vimrc

add these lines to opened file

set nocompatible
set expandtab
set shiftwidth=4

Apt-Get settings on ubuntu 15.10

I've seen many people got stuck at

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install <any-package>

these command despite of setting http_proxy or HTTP_PROXY. Since Ubuntu 15.10, it removed apt-get default proxy configuration. So to overcome this, create an proxy configuration file