Skip to content

Instantly share code, notes, and snippets.

@petermac-
petermac- / VMWareBorderless.ahk
Last active December 31, 2015 11:49
VMWareBorderless.ahk
#NoEnv ;Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ;Recommended for catching common errors.
Process, Priority,, High
SetBatchLines, -1 ;Have the script run at maximum speed
/*
This script forces VMWare Workstation into a fake full screen mode across two monitors (will only work if the guest OS auto-fits to the window).
For my setup the left edge of the VMWare window is placed at -1922px.
I wanted the window to span from my left monitor to my center monitor both of which are 1080p.
The extra 2px to the left is to move the left window border completely out of view.
@petermac-
petermac- / DetectSpecificUSB.ahk
Last active December 31, 2015 11:49
DetectSpecificUSB.ahk
#Persistent
#NoEnv ;Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ;Recommended for catching common errors.
SendMode Input ;Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ;Ensures a consistent starting directory.
DetectHiddenWindows, On
DetectHiddenText, On
//Edit ENTER-USB-NAME in line 36 to be the name of the USB drive you want an action performed on.
@petermac-
petermac- / 1-Custom SASS Bootstrap Column Sizes.scss
Last active January 4, 2016 16:49
Custom SASS Bootstrap Column Sizes.scss
// -----------------------------------------------------
// _mixins.scss
@mixin make-grid-columns-float-custom($class, $index) {
$classname: ".col-" + $class + "-" + $index;
#{$classname} {
float: left;
}
}
@function rmod($val1) {
@petermac-
petermac- / 1-jsmonkey-gcsearch.user.js
Last active September 12, 2015 18:36
jsmonkey-gcsearch.user.js
// ==UserScript==
// @name jsmonkey-gcsearch additional Google search filters
// @namespace http://techexplored.com
// @description Adds 2 custom search filters to limit search results to the past 6 months or 2 years.
// @contributor petermac-
// @version 2014.05.09
//
// @icon http://www.google.com/favicon.ico
// @include /(http|https)?://.*\.google\.[^\/]+?/(#.*|search\?.*)?$/
// @grant none
@petermac-
petermac- / READMETemplateForOSS.md
Last active August 29, 2015 14:01 — forked from uchidaknet/READMETemplateForOSS.md
README.md template

Alt Readme Template

This is a README.md template for open source software.

At the top of the file there should be a short introduction and/or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Table of Contents

@petermac-
petermac- / 0_reuse_code.js
Created May 31, 2014 14:05
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@petermac-
petermac- / 1-drop_db_tables.sh
Last active September 12, 2015 19:38
drop_db_tables.sh
#!/bin/bash
MUSER="$1"
MPASS="$2"
MDB="$3"
# Detect paths
MYSQL=$(which mysql)
AWK=$(which awk)
GREP=$(which grep)
@petermac-
petermac- / 1-flushdns-mavericks.sh
Last active September 12, 2015 19:38
flushdns-mavericks.sh
#!/bin/bash
dscacheutil -flushcache
sudo killall -HUP mDNSResponder
@petermac-
petermac- / 1-unix_commands.sh
Last active September 12, 2015 19:38
unix_commands.sh
# Return to the directory you were in before executing your last cd command.
cd -
# Run your last entered command as sudo.
sudo !!
# Shows who’s currently logged in to your system.
w
# Attaches line numbers to text.
@petermac-
petermac- / 1-youtube_likes.js
Last active September 12, 2015 19:38
youtube_likes.js
// ==UserScript==
// @name YouTube Likes
// @description Displays number of likes and dislikes of YouTube videos.
// @namespace http://turplepurtle.com
// @author TurplePurtle
// @version 2.0.1
// @include http://www.youtube.com/*
// @include https://www.youtube.com/*
// ==/UserScript==