Skip to content

Instantly share code, notes, and snippets.

Avatar

Kyle Gottfried Spitfire1900

  • IBM WebSphere Admin @ Auto-Owners Insurance
View GitHub Profile
@Spitfire1900
Spitfire1900 / debug.md
Created Jul 20, 2017
atom-beautify installation failure
View debug.md

Installing atom-beautify to C:\Users\e018503.atom\packages �[31mfailed �[39m�[31mC:\Users\e018503\AppData\Local\Temp\apm-install-dir-117620-9732-241d7z.o5udviy66r `-- (empty) npm WARN deprecated node-uuid@1.4.8: Use uuid module instead npm WARN deprecated graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\e018503\AppData\Local\Temp\apm-install-dir-117620-9732-241d7z.o5udviy66r\package.json'

View BuggyJythonProcessBuilder.py
from java.lang import ProcessBuilder
from java.lang.ProcessBuilder import Redirect
builder = ProcessBuilder(["fairymax"])
builder.redirectInput(Redirect.INHERIT)
builder.redirectOutput(Redirect.INHERIT)
builder.redirectError(Redirect.INHERIT)
builder.start().waitFor()
#### OUTPUT ####
#tellics say Fairy-Max 4.8V
#tellics say by H.G. Muller
@Spitfire1900
Spitfire1900 / TestProcessBuilder.java
Last active Apr 13, 2016
Inherit the io of a subprocess in Java, allowing you to talk through Java to the process in the shell like normal.
View TestProcessBuilder.java
import java.lang.ProcessBuilder;
import java.lang.ProcessBuilder.Redirect;
public class TestProcessBuilder
{
public static void main(String args[])
{
try
{
ProcessBuilder builder = new ProcessBuilder("fairymax");
@Spitfire1900
Spitfire1900 / passsec.sh
Last active Dec 4, 2015
Securely provide password for a bash one-liner.
View passsec.sh
#! /bin/bash
if [ -z $pass ]; then
read -s -p "Enter Password: " pass
printf "\n\r"
fi
View .gitconfig
[user]
name = Kyle Gottfried
email = Kyle.Gottfried@outlook.com
[alias]
tree = log --graph --decorate --pretty=oneline --abbrev-commit
[diff]
tool = meld
[merge]
tool = meld
[difftool]
@Spitfire1900
Spitfire1900 / parsexml.sh
Last active Dec 3, 2015
Parse XML in bash
View parsexml.sh
#! /bin/bash
#xml parser, assigns entity to $E and content to $C
rdom () { local IFS=\> ; read -d \< E C ;} # https://stackoverflow.com/questions/893585/how-to-parse-xml-in-bash/7052168#7052168
while rdom; do
if [[ $E = $2 ]]; then
echo $C
exit
fi
@Spitfire1900
Spitfire1900 / CircleAttributes.py
Last active Dec 2, 2015
Print the statistics of a circle
View CircleAttributes.py
r = int(input("Please enter the radius of a circle: "))
print("Printing statistics of a circle that has a radius of", r, "units.")
import math as m
a = (m.pi*r)**2
d = r*2
c = 2*(m.pi)*r
print("Radius:", r, "units")
print("Diameter:", d, "units")