Skip to content

Instantly share code, notes, and snippets.

View approximatenumber's full-sized avatar
🥝

Maksim Melnikov approximatenumber

🥝
View GitHub Profile
@amfg
amfg / handle.sh
Last active July 8, 2021 10:17
Simple GitLab webhook using netcat & bash
#!/bin/bash
read request
TOKEN='secret token from gitlab' # from https://gitlab.com/{user}/{project}/settings/integrations
HAS_TOKEN=0
while /bin/true; do
read header
[[ "$header" =~ 'X-Gitlab-Token' ]] && [[ "$header" =~ $TOKEN ]] && HAS_TOKEN=1;
[[ "$header" == $'\r' ]] && break;
done
@matts-mpg
matts-mpg / get-jira-issue-matchstuff.groovy
Created July 27, 2016 04:37
This script should work with scriptrunner in JIRA to a) get an issue; b) match some stuff in the description; and c) get values from custom fields.
//Import classes you need
import com.atlassian.jira.ComponentAccessor;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.MutableIssue;
import com.atlassian.jira.issue.IssueManager;
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.user.ApplicationUser;
import com.atlassian.jira.security.JiraAuthenticationContext;
import com.atlassian.jira.issue.fields.CustomField;
@n0ts
n0ts / get_oracle_jdk_x64.sh
Last active September 16, 2023 12:07
Get latest Oracle JDK package bash shell script for linux/osx/windows
#!/bin/bash
# You must accept the Oracle JDK License Update
# https://www.oracle.com/java/technologies/javase-downloads.html
# usage: get_oracle_jdk_x64.sh <jdk_version> <platform> <ext>
# jdk_version: 14
# platform: linux or osx or windows
# ext: rpm or dmg or tar.gz or exec
jdk_version=${1:-14}
@sr75
sr75 / wget-jdk-oracle-install-example.txt
Last active March 16, 2023 11:28
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
# rpm
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \
-O jdk-7-linux-x64.rpm
# ubuntu
# Use the high-colour menu system. This file, and the low-colour 'menu.c32'
# version, are provided by the syslinux package and can be found in the
# '/var/lib/tftpboot' directory. Copy it to '/var/lib/tftpboot'.
UI vesamenu.c32
# Time out and use the default menu option. Defined as tenths of a second.
TIMEOUT 2600
# Prompt the user. Set to '1' to automatically choose the default option. This
# is really meant for files matched to MAC addresses.