View cart.exs
# from ounce of elixir
#https://www.meetup.com/Women-Who-Code-Tampa/events/233014583/
ExUnit.start
defmodule CartTest do
use ExUnit.Case
test "starts with empty count" do
assert Cart.count_items([]) == 0
View datetime.exs
defmodule CreditCard do
def current_amount_due(charges, apr, due_date, current_date \\ date_now()) do
current_date
# then proceed with calculation..
end
defp date_now do
DateTime.utc_now |> DateTime.to_unix
end
View a-main.go
package main
import (
"demo/lib"
"sync"
)
func main() {
connections := lib.GetAllConnections()
var wg sync.WaitGroup
View main.go
package main
import (
"fmt"
"sync"
"time"
"math"
)
func main() {
View a-main.go
// Manual Semaphore
package main
import (
"fmt"
"time"
)
func main() {
startTime := time.Now().Unix()
View go.go
// first stab
const defaultPort = "8080"
func getPort() string {
portEnv := os.Getenv("PORT")
if portEnv != "" {
return portEnv
}
return defaultPort
}
View search.go
package search
import (
"fmt"
"time"
)
// Search performs a search
func Search(term string) string {
View attack.md

Tested with Chrome, Firefox and Safari.

The following code will not trigger an alert. target.innerHTML = "<script> alert('XSS Attack'); </script>";

The following code will trigger an alert. target.innerHTML = "<img src=x onerror=\"alert('XSS Attack')\" >";

View run.js
fetchProfile(1, function(){
console.log("Callback 1");
});
fetchProfile(2, function(){
console.log("Callback 2");
});
fetchProfile(3, function(){
console.log("Callback 3");
});
fetchProfile(4, function(){
View promises.js
console.log("A");
var returnFromTwo = stepOne().then(stepTwo);
console.log("B");
returnFromTwo.then(stepThree);
console.log("C");