Skip to content

Instantly share code, notes, and snippets.

View ttimot24's full-sized avatar
😃
Designing software

Timot Tarjani ttimot24

😃
Designing software
View GitHub Profile
@ttimot24
ttimot24 / glassfish_installer.sh
Last active November 18, 2020 14:58
GlassFish installer
echo "----------------------------------------------"
echo "| GlassFish installer |"
echo "| by: Timot Tarjani - version: 1.2 |"
echo "----------------------------------------------"
if [ -z ${1+x} ]; then
echo "Please pass version as first argument!";
exit 1;
else
export GLASSFISH_VERSION=$1
import hudson.model.*
build.addAction(new ParametersAction([new StringParameterValue("PARAM", "VALUE")], ["PARAM"]))
package regexmatcher;
import java.util.Scanner;
import java.util.regex.Pattern;
/**
*
* @author Timot Tarjani
*/
public class RegexMatcher {
@ttimot24
ttimot24 / jenkins-credstore.groovy
Created December 1, 2017 16:30
Jenkins credential binding in Groovy script
import com.cloudbees.plugins.credentials.CredentialsProvider;
import com.cloudbees.plugins.credentials.common.StandardUsernameCredentials;
def getCredential(String id){
for (credential in CredentialsProvider.lookupCredentials(StandardUsernameCredentials.class)) {
if(credential.id.equals(id)){
return credential;
}
@ttimot24
ttimot24 / fn.slugify.sql
Created June 7, 2017 21:40 — forked from jareis-zz/fn.slugify.sql
slugify function for MySQL
/*
The MIT License (MIT)
Copyright (c) 2014 jose reis<jose.reis@artbit.pt>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@ttimot24
ttimot24 / OpenWithSublimeText3.bat
Created March 5, 2017 09:35 — forked from jackielii/OpenWithSublimeText3.bat
Add "Open with Sublime Text 3" to Windows Explorer Context Menu (including folders)
@echo off
SET st2Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f