Skip to content

Instantly share code, notes, and snippets.

View joshschmelzle's full-sized avatar
༼ つ ◕_◕ ༽つ ø

jsz joshschmelzle

༼ つ ◕_◕ ༽つ ø
View GitHub Profile
@joshschmelzle
joshschmelzle / git-ssh-client.md
Created November 18, 2017 01:50
SSH client from Git rather than Putty or Cygwin

Some popular SSH clients on Windows include Cygwin and Putty. But, there is another option. One that has a more integrated SSH experience. Both Cygwin and Putty run in separate console experiences. The goal here is to be able to type ssh user@webserver.domain.com in whatever console I want and for it to work.

If you have git for windows installed, you already have the software to do this. The bundle has several Linux familiar tools. Many probably use these in the git bash shell.

But, you don't need to run the git bash shell on windows to access SSH. You just need to make a small modification to your path.

If you know your location, just add it to your path:

@joshschmelzle
joshschmelzle / cURL-for-testing-HTTP-response.md
Created December 4, 2017 17:47
Using cURL to test HTTP response time

cuRL - Measuring HTTP Response Time

A way of measuring HTTP Response Time with cURL.

  • curl is used to transfer data to and from a server
  • in this example curl is used to measure website response time

Usage:

  • curl -w "@curl-format.txt" -o -s www.costco.com
@joshschmelzle
joshschmelzle / nslookup-specific-name-server.md
Created December 6, 2017 15:40
Using nslookup to check DNS from a specific name server

Syntax:

  • nslookup <name> <server>

Where is the DNS hostname and is the hostname or IP address of the name server.

Example:

  • nslookup www.yahoo.com 8.8.8.8
@joshschmelzle
joshschmelzle / logstash-wing-syslog.conf
Last active December 13, 2017 18:55
logstash-wing-syslog.conf
input {
tcp {
port => 514
type => syslog
}
udp {
port => 514
type => syslog
}
}
@echo off
title The Matrix
color 0a
:h
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
color 0b
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
color 0c
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
color 0d
@joshschmelzle
joshschmelzle / doskey_macros.bat
Last active December 29, 2017 16:37
doskey macro loader for win32 systems
@echo off
cd C:\
REM This batch file loads up doskey macros from a file.
REM Additionally it displays a random quote from a file to inspire the reader.
REM ::: MACROS START :::
title Free Your Mind %1
REM Create a .bat or .cmd file with your DOSKEY commands.
REM Run regedit and go to HKEY_CURRENT_USER > Software > Microsoft > Command Processor.
@joshschmelzle
joshschmelzle / wifi.bat
Last active May 23, 2018 19:13
Modified Wi-Fi batch file. Originally created by Tom Carpenter
@ECHO OFF
if [%1]==[] GOTO MENU
if /I %1==interfaces GOTO SHOWALL
if /I %1==networks GOTO NETWORKS
if /I %1==drivers GOTO DRIVERS
if /I %1==settings GOTO SETTINGS
@joshschmelzle
joshschmelzle / now.bat
Last active May 30, 2018 12:34
Prints the local date and time in ISO format to the screen on a Windows machine
@echo off
for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' set ldt=%%j
set ldt=%ldt:~0,4%-%ldt:~4,2%-%ldt:~6,2% %ldt:~8,2%:%ldt:~10,2%:%ldt:~12,6%
echo local time is %ldt%
@joshschmelzle
joshschmelzle / TypeWriter.cs
Last active September 18, 2018 19:59
Typewriter effect for C# console - https://gfycat.com/ObeseFancyAvians
using System;
using System.IO;
using System.Text;
using System.Threading;
namespace LazyWriter
{
class TypeWriter : System.IO.TextWriter
{
private TextWriter originalOut;
@joshschmelzle
joshschmelzle / resequence.py
Created November 28, 2018 18:18
Iterates through ESS accessPoints.json objects and renames APs.
import json
json_data = object()
with open('accessPoints.json') as f:
json_data = json.load(f)
x = 1
for i in json_data['accessPoints']: