Skip to content

Instantly share code, notes, and snippets.

View chand1012's full-sized avatar

Chandler chand1012

View GitHub Profile
@chand1012
chand1012 / wifi_passwd.cmd
Last active March 15, 2017 03:07
Windows 8+ wifi password retriever
@echo off
set /p ssid="Enter SSID of Network"
netsh wlan show profile name=%ssid% key=clear | findstr Key
pause
import imaplib
import email
from json import loads
def email_login_info(file_name='login.json'):
try:
file_keys = open(file_name)
except:
import imaplib
import email
from json import loads
def email_login_info(file_name='login.json'):
try:
file_keys = open(file_name)
except:
file_keys = open(file_name, 'w')
raw_json = '''{
@chand1012
chand1012 / 95_percent_confidence.py
Last active May 1, 2017 02:48
confidence calculator
from math import sqrt
print("Calculating confidence of 95%")
avg = float(input("Enter average of the data:"))
n = int(input("Enter number of items:"))
sd = float(input("Enter standard devation:"))
z = 1.96
conf_high = avg + z * (sd/sqrt(n))
conf_low = avg - z * (sd/sqrt(n))
@chand1012
chand1012 / keyboard.json
Created May 14, 2017 03:34
Windows VK keys 1-9, a-z
{
"0": "0x30",
"1": "0x31",
"2": "0x32",
"3": "0x33",
"4": "0x34",
"5": "0x35",
"6": "0x36",
"7": "0x37",
"8": "0x38",
@chand1012
chand1012 / WebCrawler.rb
Created May 15, 2017 02:12
Web Crawler made in ruby. Designed for Wikipedia.
require 'rest-client'
require 'nokogiri'
require 'random_methods'
require 'os'
#v1.1: Added help section
#v1.2: Fixed bug with Ruby 2.2.3
#v1.3: Added change log
wikiLink = "wikipedia.org"
urlList = Array.new
url = nil
@chand1012
chand1012 / launch.bat
Created May 16, 2017 02:08
My batch script for my modded Minecraft server
:: this is the file that handles the server for my modded Minecraft on my 6-core PC
:: ParallelGCThreads can be changed to accomodate any number of cores, just give it the number of threads needed
:: if you are hosting a vanilla server, change forge.jar to the name of the Minecraft server jar
:: change Xmx to the amount of RAM your computer has
:: change 'world3' to the name of your Minecraft world to backup the world automatically
:: lines 10, 13-15 have to do with automatic restart on crash
@echo off
color 0a
title MWServer
:a
@chand1012
chand1012 / settings.json
Created May 21, 2017 12:32
Settings file for my project WinGuake
{"color": "color 0a", "minimize": "min", "exit": "exit"}
@chand1012
chand1012 / auto-update.pyw
Last active August 8, 2017 16:27
Python Git repo auto updater
import os, sys
from easygui import *
title = "Git Auto Update"
msg = "Do you want to update your Git Repos?"
if not ynbox(title, msg):
sys.exit()
print('Getting list of directories...')
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
echo Installing Discord
apt install libgconf-2-4 libappindicator1
cd ~/Downloads
wget -O discord-0.0.2.deb https://discordapp.com/api/download?platform=linux&format=deb
sudo dpkg -i discord-0.0.2.deb