Skip to content

Instantly share code, notes, and snippets.

View arttuladhar's full-sized avatar

Aayush Tuladhar arttuladhar

View GitHub Profile
## Prune Remote Branches
git remote prune origin
git fetch origin --prune
# Git Commit Logs between Two Hash
git log --oneline 51e5a6d1..29612ede

Kitchen Commands

kitchen list
kitchen create
kitchen login <InstanceName>
@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 / jsonValidator.py
Created May 2, 2017 21:00
Checks Valid JSON in a directory
#!/bin/python
import os
import json
script_dir = '.'
valid_json = 0
invalid_json = 0
package com.art.model;
import java.io.Serializable;
import javax.persistence.*;
/**
* The persistent class for the address database table.
*
*/
#!/bin/sh
echo "Run with sudo. This will completely uninstall ChefDK, continue? (y/n) "
read yn
if [ "$yn" != "y" ] && [ "$yn" != "Y" ]; then
echo "Not doing anything. Exiting."
exit 1
fi
echo "doing the stuff!"
@arttuladhar
arttuladhar / a.rb
Last active May 13, 2017 00:32
Using urllib2 and urllib
import urllib2
import urllib
response = urllib2.urlopen("http://www.aayushtuladhar.com")
print "Response: ", response
print "The URL is ", response.geturl();
# Getting the response Code
print "Response Code: ", response.code
package com.art.test;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.Iterator;
import org.junit.Test;
@arttuladhar
arttuladhar / apt-get
Last active January 24, 2016 02:40
Useful Essential apt-gets
* sudo apt-get update
* sudo apt-get upgrade
* sudo apt-get install apache2 -y
* sudo apt-get install nodejs npm node-semver
* sudo apt-get install node
* sudo apt-get install nodered
* sudo apt-get install git
* sudo apt-get install oracle-java7-jdk
@arttuladhar
arttuladhar / build.txt
Last active January 18, 2016 02:23
Building from Source
./configure
make
sudo make install