Skip to content

Instantly share code, notes, and snippets.

View jbouse's full-sized avatar

Jeremy T. Bouse jbouse

View GitHub Profile
@jbouse
jbouse / install.ps1
Created January 31, 2016 05:19
PowerShell install for NuGet.exe
$sourceNugetExe = "http://nuget.org/nuget.exe"
$targetNugetExe = "$env:TEMP\nuget.exe"
Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe
$p = Start-Process $targetNugetExe -ArgumentList "install NuGet.CommandLine -Output $env:ProgramData -ExcludeVersion -NonInteractive" -wait -NoNewWindow -PassThru
Remove-Item $targetNugetExe
@jbouse
jbouse / fix-git-authors.sh
Created March 2, 2016 01:47
Found online, can't recall source to give credit
#!/bin/bash
#
# Changes author and committer name and email throughout the whole repository.
# Uses a file with the following format:
#
# [email protected]=John Doe <[email protected]>
# [email protected]=Jill Doe <[email protected]>
#
if [ ! -e "$1" ]
Section "InputClass"
Identifier "DualPoint Stick blacklist"
MatchProduct "DualPoint Stick"
Option "Ignore" "on"
EndSection
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
trap - INT TERM
docker run --rm \
-t $(tty &>/dev/null && echo "-i") \
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
trap - INT TERM
docker run --rm \
-t $(tty &>/dev/null && echo "-i") \
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
trap - INT TERM
docker run --rm \
-t $(tty &>/dev/null && echo "-i") \
@jbouse
jbouse / jenkins-dump-credentials.groovy
Last active August 26, 2020 20:12 — forked from timja/jenkins-dump-credentials.groovy
Dump jenkins credentials - use in script console
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.common.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.plugins.credentials.impl.*
import com.cloudbees.jenkins.plugins.sshcredentials.impl.*
import com.cloudbees.jenkins.plugins.awscredentials.*
import org.jenkinsci.plugins.plaincredentials.impl.*
import hudson.plugins.blazemeter.*
domain = Domain.global()
stage('Reload') {
options {
retry(2)
}
steps {
sh "curl -fsSLO ${JENKINS_URL}jnlpJars/jenkins-cli.jar"
withCredentials([usernamePassword(credentialsId: 'jenkins-remoting', passwordVariable: 'JENKINS_API_TOKEN', usernameVariable: 'JENKINS_USER_ID')]) {
sh "java -jar jenkins-cli.jar -s ${JENKINS_URL} reload-jcasc-configuration"
}
}
#!/bin/bash
GRADLE_VERSION=$(curl -fsSL https://services.gradle.org/versions/current |jq --raw-output '.version') \
&& wget https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip \
&& unzip -d /usr/local gradle-${GRADLE_VERSION}-bin.zip \
&& ln -sf /usr/local/gradle-${GRADLE_VERSION} /usr/local/gradle \
&& rm -f gradle-${GRADLE_VERSION}-bin.zip
<?php
try {
if (count(["cid"]) == 0) {
$channelId = "UCL7oxb4N7uxEOHPlhFFxAhg";
}else{
$channelId = ["cid"];
}
$videoId = getLiveVideoID($channelId);
$chatUrl = "https://www.youtube.com/live_chat?v=" . trim($videoId) . "?is_popout=1"