Skip to content

Instantly share code, notes, and snippets.

@markv5
markv5 / logstash.conf
Created June 25, 2018 10:29 — forked from glnds/logstash.conf
Logstash Glassfish server.log config
# Logstash config for Glassfish logs
# Used in combination with slf4j and logback
# Output:
# - application: glassfish
# - type: application or internal
# - categorie: technical or functional
input {
# If running logstash under a different user then check your permission to be sure that
@markv5
markv5 / config.py
Created April 27, 2018 12:25 — forked from dvapelnik/config.py
Translate in command line using YandexTranslateAPI
YandexApiKey = 'Your.Yandex.Translate.API.Key.Should.Be.Here'
@markv5
markv5 / glassfish-clear.sh
Created November 24, 2017 04:58 — forked from agritsik/glassfish-clear.sh
Clear glassfish cache
#!/usr/bin/env bash
rm -rf $GLASSFISH_HOME/glassfish/domains/domain1/generated/*
rm -rf $GLASSFISH_HOME/glassfish/domains/domain1/osgi-cache/*
rm -rf $GLASSFISH_HOME/glassfish/domains/domain1/applications/*
@markv5
markv5 / gf-local-cleanup.sh
Created November 14, 2017 06:24 — forked from nyxcalamity/gf-local-cleanup.sh
Utility scripts to clean up glassfish domain folders to avoid permgen exception
#!/bin/bash
#Cleans up glassfish domain folders so that the maven deployment with cargo doesn't hang.
#---------------------------------------------------------------------------------------------------
# CUSTOMIZATION SECTION START
#---------------------------------------------------------------------------------------------------
export GF_DIR=/home/nyxcalamity/ws/appservers/glassfish
#---------------------------------------------------------------------------------------------------
# CUSTOMIZATION SECTION END
#---------------------------------------------------------------------------------------------------
export OK="$(tput setaf 2) DONE$(tput sgr0)"
@markv5
markv5 / glassfish-install.sh
Created October 17, 2017 10:43
Script to install Glassfish 4.1 on Centos7
#!/bin/bash
#title :glassfish-install.sh
#description :The script to install Glassfish 4.1.x
#author :Mateusz Smolik
#date :2016-06-15T17:14-0700
#usage :/bin/bash glassfish-install.sh
#tested-version :4.1.1
#tested-distros :Debian 8; Ubuntu 16.04; CentOS 7; Fedora 23
#script-version :0.0.1
@markv5
markv5 / screenshare
Created September 21, 2017 12:48 — forked from Saicheg/screenshare
Share screenshots on Ubuntu using Dropbox
#!/bin/bash
################
# Description:
# This script will take screenshot of your desktop
# or only active window ( running with -u param ),
# copy it to /Dropbox/Public/share/ with uniq name
# and save path to clipboard
#################
# Requirements:
# Dropbox
@markv5
markv5 / instarss.php
Created August 14, 2016 16:56 — forked from jonathanbell/Instarss.md
Make a RSS feed from an Instagram user's username
<?php
if (!isset($_GET['user'])) {
if (!isset($_GET['hashtag'])) {
exit('Not a valid RSS feed. You didn\'nt provide an Instagram user or hashtag. Send one via a GET variable. Example .../instarss.php?user=snoopdogg');
}
}
if (isset($_GET['user']) && isset($_GET['hashtag'])) {
exit('Don\'t request both user and hashtag. Request one or the other.');