Skip to content

Instantly share code, notes, and snippets.

View jpukg's full-sized avatar
🧭
Full Stack Developer (Java, Angular)

Jayaprakash (JP) jpukg

🧭
Full Stack Developer (Java, Angular)
View GitHub Profile
@jpukg
jpukg / 00_go_examples.md
Created February 14, 2022 09:57 — forked from tramamte/00_go_examples.md
Go examples
  1. Channel synchronization
  2. Timeout
  3. Non-blocking channel operation
  4. Timer
  5. Ticker
  6. Worker pool
  7. Rate limiting
  8. Automic counter
  9. Stateful goroutine
  10. Collection function
@jpukg
jpukg / ZipUtility.java
Created January 17, 2022 12:56 — forked from anna-dolbina/ZipUtility.java
This sample demonstrates how to add a new file (or overwrite the existing one) in a ZIP archive
import java.io.*;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import java.util.zip.ZipOutputStream;
public class ZipUtility {
private final File zipFilePath;
@jpukg
jpukg / xxeftp.py
Created December 27, 2021 21:50 — forked from ruevaughn/xxeftp.py
Python FTP server for XXE
#!/usr/env/python
from __future__ import print_function
import socket
s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.bind(('0.0.0.0',2121))
s.listen(1)
print('XXE-FTP listening ')
conn,addr = s.accept()
print('Connected by %s',addr)
@jpukg
jpukg / delete-old-branches.sh
Created December 27, 2021 21:47 — forked from JeffBelback/delete-old-branches.sh
Git helper functions
#!/bin/bash
# Deletes branches that have been removed on origin
function no_remote() {
if git rev-parse --git-dir >/dev/null 2>&1; then
git fetch --prune
echo "Branches with no remote:"
git branch -vv | cut -c 3- | awk '$3 !~/\[/ { printf " %s\n", $1 }'
echo -e "\nDeleting branches with deleted remote:"
del=$(git branch -vv | awk '$4 ~/gone\]/ { printf "git branch -D %s && ", $1 }')
@jpukg
jpukg / docker-destroy-all.sh
Created December 27, 2021 09:20 — forked from JeffBelback/docker-destroy-all.sh
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
containers=`docker ps -a -q`
if [ -n "$containers" ] ; then
docker stop $containers
fi
# Delete all containers
containers=`docker ps -a -q`
if [ -n "$containers" ]; then
docker rm -f -v $containers
@jpukg
jpukg / Ubuntu-Setup.txt
Created December 25, 2021 16:18 — forked from AbrarNitk/Ubuntu-Setup.txt
Install zsh, oh-my-zsh, postgres, java, maven, rust, pyenv, pyenv-virtualenv on Ubuntu-linux
## update machine
sudo apt-get update
## Install essentials and basic utility
sudo apt install -y \
build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \
libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
@jpukg
jpukg / setup_mac.sh
Created December 25, 2021 16:00 — forked from gruckion/setup_mac.sh
Setup Mac script
#!/bin/sh
####################################################################
# Check for Homebrew, install if we don't have it
####################################################################
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
@jpukg
jpukg / filebeat.config.yml
Created November 30, 2021 14:53 — forked from mosheeshel/filebeat.config.yml
reference filebeat configuration
############################# Filebeat ######################################
filebeat:
prospectors:
-
paths:
- /var/log/<APP>/app.log
fields:
logzio_codec: plain
token: ${token}
application: app # Custom field and value (can be filtered in logz.io)

#Sharing Session

Introduction

Muhammad Zaky Alvan ([email protected])

BDD Brief

BDD is extension of TDD, which write test failing test first, then implement system and/or components under tests, make the tests passes and iterate.

@jpukg
jpukg / EmbeddedSigning.java
Created November 21, 2021 12:44 — forked from Ergin008/EmbeddedSigning.java
Full code sample for DocuSign Embedded Signing Quickstart - uses open source Java Client: https://github.com/docusign/DocuSign-Java-Client
//
// DocuSign API Quickstart - Embedded Signing
//
import java.io.IOException;
import java.io.File;
import java.net.MalformedURLException;
import java.util.Arrays;
import java.util.List;