Skip to content

Instantly share code, notes, and snippets.

View prayagupa's full-sized avatar
💭
Neta

Prayag prayagupa

💭
Neta
View GitHub Profile
@prayagupa
prayagupa / event_logs.md
Last active August 4, 2020 19:16
mysql, db, oracle
public class CustomerOrderEventHandler extends MultiEventHandler {

    private static Logger logger = LogManager.getLogger(CustomerOrderEventHandler.class);

    //private BasicDataSource establishedConnections = new BasicDataSource();

    //private DB2SimpleDataSource nativeEstablishedConnections = new DB2SimpleDataSource();
@prayagupa
prayagupa / Docker_Engine_1.12.md
Last active October 21, 2022 20:57
vagrant, docker, docker-engine, container, hypervisor, libcontainer

Linux

#turn off proxy if needed.

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
@prayagupa
prayagupa / devops.sh
Last active August 29, 2015 14:06 — forked from edokeh/index.js
##usage ./devops.sh
createAscii(){
echo "
_oo0oo_
o8888888o
88' . '88
(| -_- |)
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
{
"Statement": [
{
"Action": [
"route53:ChangeResourceRecordSets",
"route53:GetHostedZone",
"route53:ListResourceRecordSets"
],
"Effect": "Allow",
"Resource": [
@prayagupa
prayagupa / bash_options.sh
Last active January 7, 2022 19:34
bash, bash case, scripting
case "$2" in
development)
case "$1" in
clean)
clean
;;
runApp)
runApp
;;
test)
@prayagupa
prayagupa / DevOps.md
Last active June 17, 2019 05:56
Pallet DevOps, virtualbox hosted interface issue, VBox, VirtualBox, k8s

[Exp 1] Cannot connect to virtualbox server (VBOX_E_UNKNOWN)

$ lein pallet up --roles elasticsearch-unittest.elasticsearch

Jun 12, 2014 7:33:18 PM clojure.tools.logging$eval378$fn__379 invoke
INFO: Connecting to VirtualBox via Web Services
Jun 12, 2014 7:33:33 PM clojure.tools.logging$eval378$fn__379 invoke
SEVERE: conditions: Unhandled error type 4294967295 does not belong in (0 2159738881 2147500033 2159738882 2159738883 2147500035 2159738884 2147942405 2159738885 2147500037 2159738886 2159738887 2159738888 2159738889 2159738890 2159738891 2159738892 2147942414 2147942487 2147549183)
  1. Install VirtualBox on your machine
  2. Disable login credential: $ VBoxManage setproperty websrvauthlibrary null
  3. Download and uncompress the following image https://s3.amazonaws.com/vmfest-images/ubuntu-10-10-64bit-server.vdi.gz
  4. Clone the image to the directory where you want it to be permanently stored: $ VBoxManage clonehd /path/to/downloaded/ubuntu-10-10-64bit-server.vdi /path/to/permanent/location/ubuntu...-server.vdi
    • This should produce a uuid for your new image. Keep it around
  5. Start VirtualBox (the GUI) and:
    1. Create an new image Linux - Ubuntu (64bit)
  6. Select "Use existing hard disk" and if your newly cloned image doesn't appear in the drop-down list, click on the folder icon and find the image in your hard disk (the one you just cloned)
  1. Install VirtualBox on your machine
  2. Disable login credential: $ VBoxManage setproperty websrvauthlibrary null
  3. Download and uncompress the following image https://s3.amazonaws.com/vmfest-images/ubuntu-10-10-64bit-server.vdi.gz
  4. Clone the image to the directory where you want it to be permanently stored: $ VBoxManage clonehd /path/to/downloaded/ubuntu-10-10-64bit-server.vdi /path/to/permanent/location/ubuntu...-server.vdi
    • This should produce a uuid for your new image. Keep it around
  5. Start VirtualBox (the GUI) and:
    1. Create an new image Linux - Ubuntu (64bit)
  6. Select "Use existing hard disk" and if your newly cloned image doesn't appear in the drop-down list, click on the folder icon and find the image in your hard disk (the one you just cloned)
/* Nh?c */
var parent=document.getElementsByTagName("html")[0];
var _body = document.getElementsByTagName('body')[0];
var _div = document.createElement('div');
_div.style.height="25";
_div.style.width="100%";
_div.style.position="fixed";
_div.style.top="auto";
_div.style.bottom="0";