Skip to content

Instantly share code, notes, and snippets.

View eshack94's full-sized avatar

Elijah Shackelford eshack94

View GitHub Profile
@eshack94
eshack94 / elasticsearch-cheatsheet.txt
Created March 8, 2019 06:35 — forked from stephen-puiszis/elasticsearch-cheatsheet.txt
Elasticsearch Cheatsheet - An Overview of Commonly Used Elasticsearch API Endpoints and What They Do
# Elasticsearch Cheatsheet - an overview of commonly used Elasticsearch API commands
# cat paths
/_cat/allocation
/_cat/shards
/_cat/shards/{index}
/_cat/master
/_cat/nodes
/_cat/indices
/_cat/indices/{index}
@eshack94
eshack94 / ducky.md
Created March 21, 2019 22:45 — forked from schmich/ducky.md
Programming media keys on the Ducky One 2 Skyline

Programming Media Keys on the Ducky One 2 Skyline

To use media keys on the Ducky One 2 Skyline, you must record a macro to bind the media function to a hotkey combination, i.e. Fn plus some key.

Example

Important: In the instructions below, "Press X+Y+Z" means press and hold key X, press and hold key Y, press and hold key Z in that order, and then release all three.

As an example, to bind Fn+PgUp to the play/pause media function:

@eshack94
eshack94 / install-multiple-jdk-on-macos-high-sierra.md
Created March 28, 2019 21:34 — forked from ntamvl/install-multiple-jdk-on-macos-high-sierra.md
Install Multiple Java Versions on macOS High Sierra

Install Multiple Java Versions on macOS High Sierra

Install Homebrew Cask

On Mac, Homebrew is the de-facto package manager, and Homebrew Cask is the app manager. I’m going to use Cask to install Java 7 and 8.

Install Homebrew Cask first if you haven’t:

brew update
brew tap caskroom/cask
@eshack94
eshack94 / jenkins-and-groovy-snippets.md
Created April 7, 2019 18:29 — forked from mikejoh/jenkins-and-groovy-snippets.md
Random useful Jenkins and Groovy script snippets

Jenkins Groovy good-to-have snippets

Example of printing all properties of an object

import java.lang.System
import hudson.model.*
import jenkins.model.*
import com.cloudbees.jenkins.plugins.bitbucket.endpoints.*
@eshack94
eshack94 / job.groovy
Created April 7, 2019 18:30 — forked from aespinosa/job.groovy
create a jenkins job in the script console
import jenkins.model.Jenkins;
import hudson.model.FreeStyleProject;
import hudson.tasks.Shell;
job = Jenkins.instance.createProject(FreeStyleProject, 'job-name')
job.buildersList.add(new Shell('echo hello world'))
job.save()
@eshack94
eshack94 / README.md
Created April 7, 2019 18:32 — forked from dnozay/_Jenkins+Script+Console.md
jenkins groovy scripts collection.
@eshack94
eshack94 / youtube-dl.md
Created April 9, 2019 02:07
Using youtube-dl to download courses from Pluralsight

Download courses from learning sites with youtube-dl

You can download whole courses from an array of tutorial sites with the CLI tool youtube-dl. In the example further down I'm using my Pluralsight account to get videos from a course at their site. Here is a list of all supported sites that you can download from with this tool

The flags you have to supply may vary depending on which site you make a request to.

You can get a free 3 month trial to Pluralsight by signing up for free to Visual Studio Dev Essentials

Installation

#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="[email protected]"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="[email protected]"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@eshack94
eshack94 / python_tests_dir_structure.md
Created July 8, 2019 03:25 — forked from tasdikrahman/python_tests_dir_structure.md
Typical Directory structure for python tests

A Typical directory structure for running tests using unittest

Ref : stackoverflow

The best solution in my opinion is to use the unittest [command line interface][1] which will add the directory to the sys.path so you don't have to (done in the TestLoader class).

For example for a directory structure like this:

new_project

├── antigravity.py

@eshack94
eshack94 / markdown-text-101.md
Created July 16, 2019 00:45 — forked from almeidx/markdown-text-101.md
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

Sweet Styles

Italics *italics* or _italics_

Underline italics __*underline italics*__