Skip to content

Instantly share code, notes, and snippets.

View mrwm's full-sized avatar

William Chung mrwm

View GitHub Profile
@mrwm
mrwm / Balls.sh
Created February 10, 2016 06:19
Make a mac say "balls" every now and then...
# Credit: https://www.reddit.com/r/AskReddit/comments/44tard/what_was_a_loophole_that_you_found_and_exploited/czt5wl8
while true
do
sleep $[RANDOM%3600+1]
osascript -e "set volume 10"
say "balls"
done
@mrwm
mrwm / Ballz.vbs
Last active March 4, 2016 04:39
Makes your computer say "balls" once in every 2 minutes in windows
'
'Credit for the author here: # Credit: https://www.reddit.com/r/AskReddit/comments/44tard/what_was_a_loophole_that_you_found_and_exploited/czt5wl8
'
Set WshShell = CreateObject("WScript.Shell")
Set WinFSO = CreateObject("Scripting.FileSystemObject")
Set oVoice = CreateObject("SAPI.SpVoice")
'Since you're probably playing with this script, create a batch file to easily kill it.
'WinFSO.CreateTextFile("stahp.plz.bat", True).Write "taskkill /im wscript.exe /f"
@mrwm
mrwm / DerpBox.vbs
Last active March 4, 2016 05:37
Creates a message box with the message "derp"
do
dim s
randomize
s = int(rnd*11) + 1
select case s
case 1
WScript.Sleep 1000
MsgBox "DERP" ,0, "derp"
case 2
WScript.Sleep 1000
@mrwm
mrwm / moo.vbs
Created March 4, 2016 05:56
Creates a bat script animation and launches it
set wshshell = wscript.CreateObject("wScript.Shell")
' Make cow script:
wshshell.run "Notepad"
wscript.sleep 400
' ### COW ONE ###
' @ECHO OFF
wshshell.sendkeys "@"
@mrwm
mrwm / fuck
Last active March 9, 2016 07:47
.................####
...............##....##
...............##....##
...............##....##
...............##....##
...............##....##
...........######....######
.........##....##....##....####
.........##....##....##....##..##.
.######..##....##....##....##....##
@mrwm
mrwm / speech2txt-bing.sh
Last active January 2, 2017 05:02
Voice Recognition for the Raspberry Pi (STT)
#!/bin/bash
# Usage: ./speech2txt-bing.sh
# Record and send audio file through Bing speech recognition API.
#
# The original script can be found here:
# https://stackoverflow.com/questions/38139809/408-request-timed-out-microsoft-speech-to-text/41111609#41111609
#
SUBSCRIPTION_KEY=<ENTER_SUBSCRIPTION_KEY>
LOCALE=en-US
SCENARIOS=ulm
@mrwm
mrwm / Mouse_Recorder.ahk
Last active January 10, 2017 06:49
A mouse recording macro
; http://www.autohotkey.com/forum/viewtopic.php?t=64464
; CTRL+SHIFT+R: Start Recording
; CTRL+SHIFT+S: Stop Recording/Playback
; CTRL+SHIFT+P: Playback
{ ; Auto-Execute
#NoTrayIcon
SetBatchLines, -1
CoordMode, Mouse, Screen
Gui, +ToolWindow +AlwaysOnTop
@mrwm
mrwm / math42.bat
Last active March 17, 2018 00:33
extra credit for math 42 @sjsu
@ECHO OFF
echo This script is only accurate up to 45.
echo Anything larger will be an overflow.
:vars
set /p stop="Enter end number: "
set num1=0
set num2=0
set c=0
@mrwm
mrwm / index.html
Created February 10, 2021 20:48
Art103 template html for google docs embeds
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Title</title>
<meta name="description" content="The description">
<meta name="author" content="Author">
<meta name="viewport" content="width=device-width, initial-scale=1">
@mrwm
mrwm / sane-config
Created September 6, 2019 23:01
sane-config in libsane-dev from jessie amd64 package (libsane-dev_1.0.24-8+deb8u2_amd64)
#!/bin/sh
#
# This script is part of SANE, <URL:http://www.sane-project.org/>
#
# Send bugreports and other requests to sane-devel@lists.alioth.debian.org
PACKAGE="sane-backends"
scriptname="sane-config"
prefix="/usr"