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
/* | |
TITLE: Commissions Calculator | |
AUTHOR: Seth Krasnianski | |
PURPOSE: Calculate how much money is spent in commission to brokers and prepare a stock report to track commissions. | |
VARIABLE DICTIONARY | |
Variable Type Represents | |
first int Represents whether the program has been run before or not. |
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
/* | |
TITLE: Madlibs | |
AUTHOR: Seth Krasnianski | |
PURPOSE: Simple madlibs program, requires user input, then generates user created madlib. | |
*/ | |
#include <iostream> | |
#include <string> |
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
<?php | |
/* | |
TITLE: PHP Validation | |
AUTHOR: Seth Krasnianski | |
PURPOSE: Validates that HTML form input are set. Two security additions to prevent direct access and invalid e-mails. | |
*/ | |
// Prevents direct access |
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
<?php | |
/* | |
TITLE: PHP State Form Validation | |
AUTHOR: Seth Krasnianski | |
PURPOSE: Validates that HTML form input are set, and abide by rules of state expungement laws. | |
*/ | |
$default = 'State'; // Default for state select input |
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
<!DOCTYPE html> | |
<!-- | |
TITLE: JavaScript Events | |
AUTHOR: Seth Krasnianski | |
PURPOSE: Basic 'click' event and event handler in JavaScript. | |
--> | |
<html> | |
<head> |
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
## Git Shortcuts | |
alias gs="git status" | |
alias gd="git diff" | |
alias gb="git branch" | |
alias gcb "git checkout -b" | |
## Git detailed output | |
function parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\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
Function.prototype.debounce = function (threshold, execAsap) { | |
var func = this, timeout; | |
return function debounced () { | |
var obj = this, args = arguments; | |
function delayed () { | |
if (!execAsap) | |
func.apply(obj, args); | |
timeout = null; |
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
;(function($,sr){ | |
// debouncing function from John Hann | |
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/ | |
var debounce = function (func, threshold, execAsap) { | |
var timeout; | |
return function debounced () { | |
var obj = this, args = arguments; | |
function delayed () { |
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
:goat::goat::goat::goat::goat::goat::goat::goat: | |
:goat::goat::goat::goat::goat::goat::goat::goat: | |
:goat::goat::goat::goat::goat::goat::goat::goat: | |
:goat::goat: :goat::goat: :goat::goat: | |
:goat::goat: :goat: :goat::goat: | |
:goat::goat: :goat::goat: | |
:goat::goat: :goat: :goat: :goat::goat: | |
:goat::goat: :goat::goat: :goat::goat: | |
:goat::goat: :goat::goat: :goat::goat: | |
:goat::goat: :goat::goat: :goat::goat: |
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
(deftest deleting-a-vendor | |
(let [admin-cs (sign-in 1) | |
research-cs (sign-in 0)] | |
(seed {:model "Vendor"}) | |
(testing "deleting an existing vendor" | |
(are [code store] (= code (:status (delete "/api/vendors/1" {:cookie-store store}))) | |
200 admin-cs | |
403 research-cs | |
404 admin-cs |
OlderNewer