Skip to content

Instantly share code, notes, and snippets.

View mstan's full-sized avatar

Matt Stanley mstan

View GitHub Profile
@mstan
mstan / day.js
Created May 1, 2019 18:35
Day of week
/*
getDay returns a number that represents the day of the week.
In programming, we never start at 1 when counting. We start at 0!
Therefore, the seven days of the week are 0-6 (not 1-7).
0 is Sunday
1 is Monday
2 is Tuesday
3 is Wednesday
/*
getDay returns a number that represents the day of the week.
In programming, we never start at 1 when counting. We start at 0!
Therefore, the seven days of the week are 0-6 (not 1-7).
0 is Sunday
1 is Monday
2 is Tuesday
3 is Wednesday
function doSomething() {
if(true) {
let booleanValue = true;
}
console.log(booleanValue); // It'll throw an exception in the compiler because booleanValue doesn't exist out here.
}
function doSomething() {
if(true) {
var _heroes = {
"Doomfist": 0,
"Genji": 0,
"McCree": 0,
"Pharah": 0,
"Reaper": 0,
"Soldier 76": 0,
"Tracer": 0,
"Sombra": 0,
var soundArr = ['A.wav', 'B.wav', 'C.wav', 'D.wav']; //Array of all of our sound files
var tempNum = 0; //Temporary number that is just used to figure out where we are
var buttonPressTime = 0; //In seconds, start as zero. This would be replaced with how long it would actually take
var buttonPress = function(buttonPressTime) { //Declare a function--not run--that does the following with the input of buttonPressTime
if(buttonPressTime < 1 ) { //if the value of buttonPressTime is less than 1 (second)
playSound(soundArr[tempNum]);
tempNum = tempNum + 1; //Take the variable tempNum, and set it equal to tempNum + 1 (current value, but one higher);
"custom_weapons_v3"
{
"*" //Everyone
{
"40" // Backburner massive pushback
{
"preserve_attributes" "1"
"quality" "10" //Customized
"1" "255 ; 2" // "airblast pushback scale"
// sample animation script
//
//
// commands:
// Animate <panel name> <variable> <target value> <interpolator> <start time> <duration>
// variables:
// FgColor
// BgColor
// Position
// Size
bind KP_END "build 2; destroy 2" //Sentry
bind KP_DOWNARROW "build 0; destroy 0" //Dispenser
bind KP_PGDN "build 1; destroy 1" //Tele Entrance
bind KP_LEFTARROW "build 3; destroy 3" //Tele Exit
@mstan
mstan / item_whitelist_ugc_hl.cfg
Created July 6, 2015 02:27
cfg/item_whitelist_UGC_HL.cfg update 7/5/15
// UGC 9v9 Whitelist
// Updated: May 26, 2015 by .blazingboy
// --------------------------------------------------------------------------
"item_whitelist"
{
// Paramater for unlisted items, such as newly released items not yet listed.
"unlisted_items_default_to" "0"
//Banned Items