Skip to content

Instantly share code, notes, and snippets.

@jmac-slash0
jmac-slash0 / epochTime.cs
Last active August 29, 2015 13:56
Get current epoch time
View epochTime.cs
var epochTime = (DateTime.UtcNow - new DateTime(1970, 1, 1)).ToLocalTime().TotalSeconds;
@jmac-slash0
jmac-slash0 / centeredImg.html
Last active December 21, 2015 18:19
A straightforward, simple centered image in a "block" example. You can just put a bunch of these galleryBlock divs next to each other in a wrapper div and they should space out and look OK.
View centeredImg.html
<style>
.galleryBlock {
<!-- Fitment -->
height: 214px;
width: 214px;
line-height: 214px;
text-align: center;
margin: 10px;
display: inline-block;
@jmac-slash0
jmac-slash0 / togglerDemo.html
Last active December 21, 2015 18:29
A demo for the jquery toggle function I wrote. It's neato because now that it's setup, toggling and updating sections with icons, tooltips, or whatever you like is easy, as is hiding or showing all sections at the same time.
View togglerDemo.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Toggler Demo</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
<style>
@jmac-slash0
jmac-slash0 / activateSpeakers.vbs
Created November 3, 2017 19:07
Call nircmd to change the current audio device
View activateSpeakers.vbs
Set WshShell = CreateObject("WScript.Shell")
cmds=WshShell.RUN("..\nircmd.exe setdefaultsounddevice ""Speakers"" 1", 0, True) ' Default Device
cmds=WshShell.RUN("..\nircmd.exe setdefaultsounddevice ""Speakers"" 2", 0, True) ' Default Communications Device
Set WshShell = Nothing