Skip to content

Instantly share code, notes, and snippets.

View w25r's full-sized avatar

William Lichtenberger w25r

  • Kansas City, Missouri
View GitHub Profile
@w25r
w25r / jenkins.bat
Created December 17, 2015 12:29
Start Jenkins from a war
SET JENKINS_HOME=C:\jenkins
SET JAVA_EXE="c:\Program Files\Java\jre1.8.0_65\bin\java.exe"
%JAVA_EXE% -jar jenkins.war
@w25r
w25r / NoSleep.vbs
Created October 28, 2015 14:56
A simple VBScript that will stop a computer from going to screen saver or lock screen
' Multiple references were used to create this, but the closest is:
' https://gallery.technet.microsoft.com/scriptcenter/Stop-locking-computer-by-3d6e2ac2
Set ws = WScript.CreateObject("WScript.Shell")
Do
'Every 10 minutes should do
Wscript.Sleep (1000 * 60 * 10)
ws.sendkeys("{NUMLOCK}{NUMLOCK}")
Loop
@w25r
w25r / winrm.log
Created February 11, 2015 16:22
WinRM Recursion Error
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:320:in `start': can't create Thread (12) (ThreadError)
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:320:in `create_with_logging_context'
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:294:in `start'
from C:/opscode/chef/embedded/lib/ruby/1.9.1/timeout.rb:60:in `timeout'
from C:/opscode/chef/embedded/lib/ruby/1.9.1/timeout.rb:100:in `timeout'
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:872:in `parse_header'
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:855:in `read_header'
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:662:in `get_header'
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/httpclient-2.6.0.1/lib/httpclient.rb:1247:
@w25r
w25r / gradle!.bat
Created April 26, 2014 16:53
gradle and gradlew batch file support
@echo off
:: This is a handy file to put in a common gradle directory, say C:\Program Files\Gradle, and add that directory to the path
:: Then, when you want to change which version of gradle is used by default, you simply update the batch file to point to that version, without
:: needing to update your path variable.
SET GRADLE_DIR="C:\Program Files\Gradle\gradle-1.10"
%GRADLE_DIR%\bin\gradle %*
@w25r
w25r / .gitignore
Last active August 7, 2022 19:42
Basic .gitignore for gradle, including Eclipse and Intellij settings
#Gradle
.gradle/
build/
# Eclipse
.classpath
.project
.settings/
bin/
@w25r
w25r / JavaFromJava.java
Last active August 29, 2015 13:57
Gradle Windows Process Execution Hanging Example
import java.io.IOException;
import java.io.OutputStream;
import javax.swing.JOptionPane;
import org.codehaus.groovy.runtime.ProcessGroovyMethods;
public class JavaFromJava
{