This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SpiceWorks ticket autofill | |
// Autofills the ticket based on get variables in the URL of the ticket. | |
// This file is at: https://gist.github.com/benyanke/994ce01b938fd2d1eb9ec1a0ecb79b35 | |
// | |
// Also usable on sites at either of the following URLs. | |
// Original gist: | |
// https://gist.githubusercontent.com/benyanke/994ce01b938fd2d1eb9ec1a0ecb79b35/ | |
// | |
// Raw gist content: | |
// https://gist.githubusercontent.com/benyanke/994ce01b938fd2d1eb9ec1a0ecb79b35/raw/spiceworksTicketAutofill.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Added by Ben Yanke | |
// from https://gist.github.com/benyanke/862e446e5a816551928d8acc2d98b752 | |
console.log('Loading function'); | |
const https = require('https'); | |
const url = require('url'); | |
// SETUP | |
// urlToUse = in this environment variable, place the name of another environment variable which contains the key. | |
// This allows easy dev/prod switching. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bash Fidget Spinner | |
# Could also be included in a bashrc file | |
fidget() { | |
start_time="0.02"; | |
spin_efficiency="0.99"; | |
end_time="3"; | |
time="$start_time"; | |
printf "\e[92mPress any key to give another spin...\n\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Meeting note bash functions - include in your .bashrc file. | |
# Commands: | |
# note - Lists all past notes and their IDs. | |
# note help - This. | |
# note cd- Change your working directory to the notes storage folder | |
# note uncd - Change your working directory to the last working directory (useful for getting out of the notes storage folder) | |
# note new - Create a new note document. Will request user info then open it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############## | |
# Box Config # | |
############## | |
# Specify any plugins you want installed on every `vagrant up` run | |
# You need the hostsupdated plugin, but the others are useful too. | |
required_plugins = %w(vagrant-hostsupdater vagrant-vbguest vagrant-triggers) | |
plugins_to_install = required_plugins.select { |plugin| not Vagrant.has_plugin? plugin } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
homedir=$(eval echo ~$USER); | |
sudo chown $USER:users $homedir -R; | |
chmod 700 $homedir; | |
mkdir $homedir/.ssh; | |
touch $homedir/.ssh/authorized_keys; | |
chmod 700 $homedir/.ssh/; | |
chmod 600 $homedir/.ssh/authorized_keys; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
############## | |
# Box Config # | |
############## | |
# Currently supporting Parallels and VirtualBox |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Render all GABC files in current directory into PDF scores | |
function rendergabc() { | |
dir="`pwd`" | |
# Clean PDFs from folder | |
mkdir -p $dir/old >/dev/null 2>&1 | |
rm $dir/old/* -f >/dev/null 2>&1 | |
mv $dir/*.pdf $dir/old/ >/dev/null 2>&1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <time.h> | |
// Wait [secs] seconds | |
void waitFor (unsigned int secs) { | |
unsigned int retTime = time(0) + secs; // Get finishing time. | |
while (time(0) < retTime); // Loop until it arrives. | |
} |