Skip to content

Instantly share code, notes, and snippets.

@DejaAugustine
DejaAugustine / README.md
Last active January 15, 2018 07:26
Script to automatically install Chummer5a on OSX

This script downloads, installs, and builds everything that you need to run Chummer5a on your macOS machine.

To use:

  1. Open the Terminal app (Applications > Utilities > Terminal)
  2. Copy and paste the command below into the terminal window and hit Enter
  3. Enter your macOS password when prompted
  4. When the "Wine configuration" window pops open, change the "Windows Version" drop-down at the bottom to "Windows 7" and hit "OK"
  5. For any DotNet or .NET installer windows that pop open, accept all of the defaults
  6. When the Chummer installer completes, you'll get a message saying you can now find Chummer5a in your Applications folder. You can now launch Chummer just like any other OSX app
@DejaAugustine
DejaAugustine / gist:5814041
Created June 19, 2013 12:47
Ours is not to question why, it is but love that SASS lets us do this when we need to
$segment_text: #cccccc, #eeeeee, #aaaaaa, #ffffff;
$segment_bg: #ffffff, #bbbbbb, #ffffff, #dddddd;
$segment_block_bg: #cccccc, #eeeeee, #aaaaaa, transparent;
@for $n from 1 through 4 {
&:nth-child(#{$n}) {
background-color: nth($segment_bg, $n);
> .segment .name {
color: nth($segment_text, $n);
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
// assuming a url along the lines of:
// http://www.example.com/index.html?action=win
var action = getParameterByName("action");
@DejaAugustine
DejaAugustine / gist:3452333
Created August 24, 2012 16:06
Get a query string parameter via javascript
function getParameterByName(name)
{
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regexS = "[\\?&]" + name + "=([^&#]*)";
var regex = new RegExp(regexS);
var results = regex.exec(window.location.search);
if(results == null)
return "";
else
return decodeURIComponent(results[1].replace(/\+/g, " "));