Skip to content

Instantly share code, notes, and snippets.

View arttuladhar's full-sized avatar

Aayush Tuladhar arttuladhar

View GitHub Profile
@arttuladhar
arttuladhar / Command.java
Created July 14, 2018 04:10
Command Design Pattern Example
package com.art.head_first.homeautomation;
public interface Command {
void execute();
void undo();
}
@arttuladhar
arttuladhar / softwareengineeringexcel.md
Created July 31, 2015 04:06
Software Engineering Competency Checklist

Software Engineering Excellency

DATA STRUCTURES
  • Doesn’t know the difference between Array and LinkedList
  • Able to explain and use Arrays, LinkedLists, Dictionaries etc in practical programming tasks
  • Knows space and time tradeoffs of the basic data structures, Arrays vs LinkedLists, Able to explain how hashtables can be implemented and can handle collisions, Priority queues and ways to implement them etc.
  • Knowledge of advanced data structures like B-trees, binomial and fibonacci heaps, AVL/Red Black trees, Splay Trees, Skip Lists, tries etc
ALGORITHMS
  • Unable to find the average of numbers in an array
@arttuladhar
arttuladhar / GebDemoSpec.groovy
Created June 12, 2017 22:06
REST API Testing Using Spock
package specs
import geb.spock.GebReportingSpec
class GebDemoSpec extends GebReportingSpec {
def "Testing Basic Page Contents"(){
setup:
go "http://localhost:9000/#/demo/geb-demo"
## Prune Remote Branches
git remote prune origin
git fetch origin --prune
# Git Commit Logs between Two Hash
git log --oneline 51e5a6d1..29612ede
@arttuladhar
arttuladhar / Kitchen-CheetSheet.md
Last active May 26, 2023 16:19
Chef and Knife Commands CheatSheet

Kitchen Commands

kitchen list
kitchen create
kitchen destroy
kitchen login <InstanceName>
@arttuladhar
arttuladhar / install_ec2.sh
Last active May 6, 2023 03:04
Installing tmux on EC2
# Installing tmux on Amazon-EC2
# If you don't have libevent install use wget to install the libevent and install
wget https://github.com/downloads/libevent/libevent/libevent-2.0.18-stable.tar.gz
tar zxf libevent-2.0.18-stable.tar.gz
sudo ./configure & sudo make install
# If you don't have curses install use yum to install the curses

Keybase proof

I hereby claim:

  • I am arttuladhar on github.
  • I am arttuladhar (https://keybase.io/arttuladhar) on keybase.
  • I have a public key ASBKr_G71JtO9yx_4xVpwqqN8fNDd3l52qlbMygNn0i0dgo

To claim this, I am signing this object:

@arttuladhar
arttuladhar / troubleshoot_linux.md
Last active February 13, 2023 02:57
Linux Server Troubleshooting

Linux Server Troubleshooting

This will show who is logged on and what they are doing.

w

Check active processes are running

ps aux
@arttuladhar
arttuladhar / linux_hacks.md
Last active February 13, 2023 02:18
Handy Linux Commands

Some handy Linux command line tricks

Delete All JSON files in a directory

for files in *.json; do rm "$files"; done

Scp Multiple Files

@arttuladhar
arttuladhar / Convert.java
Created June 28, 2013 20:37
Converts resultSet to HashMap of Strings and Objects
/**
* <h2> Converts ResultSet to HashMap of List<String,Object></h2>
* @param row
* @param rs_SubItemType
* @throws SQLException
*/
private static void getHashMap( List<Map<String, Object>> row, ResultSet rs_SubItemType) throws SQLException {
ResultSetMetaData metaData = rs_SubItemType.getMetaData();