Skip to content

Instantly share code, notes, and snippets.

Various js sniplets

@dhval
dhval / apt-cyg.sh
Last active December 20, 2015 01:19
# apt-cyg: install tool for cygwin similar to debian apt-get # # Copyright (C) 2005-9, Stephen Jungels # # (http://www.fsf.org/licensing/licenses/gpl.html)
#!/bin/bash
# apt-cyg: install tool for cygwin similar to debian apt-get
#
# Copyright (C) 2005-9, Stephen Jungels
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
@dhval
dhval / .0readme.md
Last active June 6, 2022 04:37
Using Weblogic maven plugin to deploy artifacts.

Using local instance of WLS 12c in order to speed up development and hot deploy code on the fly.

..* Download free developer edition of Weblogic 12c [wls1211_dev.zip] (http://www.oracle.com/technetwork/middleware/fusion-middleware/downloads/index.html)

..* Install Oracle Enterprise Pack for Eclipse using [eclipse market] (http://download.oracle.com/otn_software/oepe/kepler) place preferably

..*Install it through command line.

wls:install -DartifactLocation=~/java/wls1211_dev.zip && cd wls1220 && ./configure.sh

@dhval
dhval / winexe - ERRDOS:ERRnomem.md
Last active August 23, 2022 13:47
WINEXE: A PSEXEC-LIKE CLIENT FOR ACCESSING WINDOWS FROM LINUX

#### Execute cmd on remote windows machine using winexe utility.

winexe --user domain\user --password=password //remotehostip cmd.exe

If you get errors like ERRDOS:ERRnomem

1.) Update windows 7 registry.


#####winexe.reg

@dhval
dhval / soap_ssl.py
Last active March 1, 2024 17:48
Script for querying deployment status using weblogic scripting tool, needs 'optparse' module in jython installltion.
#!/usr/bin/python
### A script to call soap web service with client certificate.
# http://stackoverflow.com/questions/13688713/sslsocket-passphrase-password-in-python
# change pfx (windows, binary) to pem file.
# openssl pkcs12 -in file.pfx -out file.pem
import requests
import logging
@dhval
dhval / jq.md
Last active November 12, 2022 07:34
JQ - Command Line JSON Parser

Manual -r Ignore result format -f read filter from file |= Passes the values

Filter .items array, select & print id from file .json

@dhval
dhval / _.md
Last active October 22, 2020 20:17 — forked from anonymous/index.html
Azure Power Shell

Windows/Azure CLI

@dhval
dhval / js:scripts:bluebird.js
Last active August 24, 2019 16:05
Using bluebird promises
#!/usr/bin/env node
/**
Demostrate a practical use case with Bluebird promise api.
Read a line delimited file and store into sqlite3 db.
Promise.promisifyAll - Converting synchromous api's to Async.
Promise.using and Promise.disposer - Resource managment.
Promise.map and Promise.spread - Leveraging arrays in promises.
@dhval
dhval / Linux Static IP
Created November 4, 2015 15:18 — forked from fernandoaleman/Linux Static IP
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@dhval
dhval / docker:Dockerfile
Created December 20, 2015 20:48
Java Docker Template
From ubuntu
MAINTAINER Dhval Mudawal
RUN apt-get update && apt-get --ignore-missing install -y \
build-essential \
lsof \
git \
wget \
software-properties-common \
&& apt-get clean