Skip to content

Instantly share code, notes, and snippets.

View renuka-fernando's full-sized avatar
🏠
Working from home

Renuka Piyumal Fernando renuka-fernando

🏠
Working from home
View GitHub Profile
@renuka-fernando
renuka-fernando / regex_grep_git_repos.sh
Created March 15, 2019 05:05
check regex of list of git repositories
#/bin/bash
# Grep Here ####################
regex='<\s*script\s*language\s*'
# Grep Here ####################
repo_index=1
declare -a repos=(
"git@github.com:renuka-fernando/sinhalese_language_racism_detection.git"
"git@github.com:renuka-fernando/hackgen.git"
@renuka-fernando
renuka-fernando / input_format.py
Created November 7, 2018 18:05
input format of the clock delay challange for hackgen tool
import random
from hackgen import TestInputFormat, TestGenerator, Language
class ClockDelayInputFormat(TestInputFormat):
"""
Input format of Clock Delay challenge.
https://www.hackerrank.com/contests/hourrank-28/challenges/clock-delay
"""
@tmkasun
tmkasun / dev_mode.sh
Last active October 17, 2019 09:02
Setup APIM server and Run it with it's depending servers, Will only be useful until API manager product properly pack the dependencies in to final product. Till we get there ...
#! /usr/bin/env bash
# HOW TO USE: Put this file inside the directory where you would like to extract and run the product-APIM build file (.zip file)
# Change the below path variables accordingly *** NOTE: No trailing `/` slashes has been used
# This will only work with APIM 3.0.0 latest version with Carbon 4.x kernel. Addition to coping and unziping the pack,
# This script will only create symbolic links to the carbon-apimgt repository files.
source_path="/Users/tmkasun/Documents/wso2/dev/products/apim/carbon-apimgt-forked/features/apimgt"
product_apimgt_path="/Users/tmkasun/Documents/wso2/dev/products/apim/product-apim-forked"
pack_name="wso2am-3.0.0-SNAPSHOT"
action=$1
@subfuzion
subfuzion / curl.md
Last active July 18, 2024 17:12
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@dpryden
dpryden / ClassLoaderLeakExample.java
Created October 20, 2014 00:01
Example of a ClassLoader leak in Java
import java.io.IOException;
import java.net.URLClassLoader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
/**
* Example demonstrating a ClassLoader leak.
*
* <p>To see it in action, copy this file to a temp directory somewhere,