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 / INSTALL.md
Last active February 12, 2025 15:41
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 / 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 / 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 / FastaInputFormat.java
Created November 14, 2016 06:22 — forked from jflatow/FastaInputFormat.java
Hadoop FASTA reader
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@arya-oss
arya-oss / design_pattern_filesystem.ruby
Created November 16, 2016 19:59
FileSystem Design Patterns in Ruby
=begin
Purpose. File system with 8 GoF patterns
Composite --------------- directories that contain files, each of which could be a directory
Proxy ------------------- Unix logical link
Chain of Responsibility - pointer back to the parent directory to create
"fully qualified path name"
Iterator ---------------- use iterator to control the traversal of a Composite
$rating = 4;
$courseNumber = 1;
/* Author: Aneesh Makala
* Course Number starts from 0 to no. of courses
* Click on course feedback and then select a subject
* Open Dev Tools and goto COnsole Tab and Paste this script
*/
$scope = angular.element('[ng-controller=feedbackCourses]').scope();
for($i = 0; $i< $scope.course[$courseNumber].question.course.length; $i++){
@arya-oss
arya-oss / powmod.py
Created December 4, 2016 13:14
Calculate a^b mod n, used in cryptography
def powmod(a,b,n):
'''
calculates a^b mod n
:a base number
:b power
:n A prime number
'''
c = 0
f = 1
k = b.bit_length()
@arya-oss
arya-oss / form.php
Created December 21, 2016 12:25
Dynamic option form adding
<?php
if (isset($_POST) && !empty($_POST['name'])) {
var_dump($_POST);
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
@arya-oss
arya-oss / nginxproxy.md
Created December 25, 2017 07:00 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

[user]
name = rajmani1995
email = rajmani1995@gmail.com
[credential]
helper = cache --timeout=3600
[alias]
aliases = config --get-regexp '^alias\\.'
br = branch
branch-name = rev-parse --abbrev-ref HEAD
ci = commit -m