Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am dindinw on github.
* I am dindinw (https://keybase.io/dindinw) on keybase.
* I have a public key ASAB9cjdoZDnOWsLbyd7GDhc-MxQK6LdCnYfroW7J1FTgQo
To claim this, I am signing this object:
@dindinw
dindinw / jdk_download.sh
Created February 26, 2016 05:59 — forked from P7h/jdk_download.sh
Script to download JDK / JRE / Java binaries from Oracle website from terminal / shell / command line / command prompt
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget.
### You can download all the binaries one-shot by just giving the BASE_URL.
### Script might be useful if you need Oracle JDK on Amazon EC2 env.
### Script is updated for every JDK release.
### Features:-
# 1. Resumes a broken / interrupted [previous] download, if any.
# 2. Renames the file to a proper name with including platform info.
@dindinw
dindinw / .gitignore
Created February 18, 2016 06:31 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Uses http://www.ltr-data.se/opencode.html/#ImDisk virtual disk driver for windows 7 or less
# Tries to use chocolatey to install imdisk
# Sample use case:
# Import-Module ".\mount.iso.psm1"
# Invoke-IsoExe "C:\test.iso" "setup.exe" "/passive"
function Mount-Iso([string] $isoPath)
{
if ( -not (Test-Path $isoPath)) { throw "$isoPath does not exist" }
#!/bin/bash
function installDSAKeysOnTarget() {
TARGET=$1
if [ ! -f $HOME/.ssh/id_dsa.pub ]; then
ssh-keygen -t dsa -f $HOME/.ssh/id_dsa -P ''
fi
PUBKEY=`cat $HOME/.ssh/id_dsa.pub`
AUTH2_FILE='~/.ssh/authorized_keys2'
# Setup the remote machine so that this node can log into it without error$
@dindinw
dindinw / git_object_cat.sh
Created September 28, 2012 07:57
cat all git objects under .git/objects folder
# git_cat : cat all git objects
# find .git/objects/ -type f|cut -c14-15,17-20|xargs -I {} sh -c "echo '\nFor {}:' ; git cat-file -p {}"
function git_cat (){
for o in $(find .git/objects/ -type f|cut -c14-15,17-20); do
echo $(tput bold) $o \($(tput setaf 1) $(git cat-file -t $o)$(tput sgr0)$(tput bold) \):$(tput sgr0)
git cat-file -p $o
done;
}