Skip to content

Instantly share code, notes, and snippets.

View ryanwarsaw's full-sized avatar

Ryan Warsaw ryanwarsaw

View GitHub Profile
#include <sstream>
#include <iostream>
#include "variable_analysis_module.h"
// TODO: Write a comment here.
void VariableAnalysisModule::ParseLine(std::string line, int line_number) {
ArrayList<std::string> result = Split(line, ' ');
std::string output;
// This would follow the format of a variable being defined as: "const <type> <name>;"
#include <algorithm>
#include <stdexcept>
template <typename T>
class ArrayList {
private:
int size_; // the size of the LIST
int capacity_; // the size of the backing ARRAY
T *data_; // The pointer to the backing ARRAY of type T
const int kDefaultCapacity = 16;
//
// main.swift
// topN_2
//
// Created by Ryan Warsaw on 12/14/17.
// Copyright © 2017 Ryan Warsaw. All rights reserved.
//
import Foundation
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="95px" viewBox="0 0 399 272" version="1.1">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="tucker">
<polygon id="top-beak" fill="#FD6E1E" points="264 64 231 64 231 0 359 0 359 8 375 8 375 16 383 16 383 24 391 24 391 40 399 40 399 56 391 56 391 64" />
<polygon id="bottom-beak" fill="#FD6E1E" points="328 80 279 80 279 72 231 72 231 88 247 88 247 96 287 96 287 104 335 104 335 112 383 112 383 96 391 96 391 88 343 88 343 80" />
<polygon id="sclera" fill="#FFFBFB" points="215.118015 23.9967358 215.118015 39.9759543 222.990429 39.9759543 222.990429 56.0436404 215.118015 56.0436404 215.118015 72.0909655 198.994579 72.0909655 198.994579 79.9924777 174.9601 79.9924777 174.9601 72.0909655 166.992223 72.0909655 166.992223 64.0777552 158.852749 64.0777558 158.852749 33.7473167 158.852749 31.9250491 166.992223 31.9250491 166.992223 23.9967358 174.9601 23.9967358 174.9601 15.9345858 20
struct LargeInt {
var digits: [Int8] = [];
/**
* Default constructor if we don't want to provide a value, this is removed when we create our own so we have to do this dummy method.
**/
init() {
digits.append(0);
}
channel = Channel(String).new
# Sender: Sends random animal from array over the channel.
spawn do
loop do
animals = ["dog", "cat", "bird", "horse", "hamster", "rabbit", "deer", "squirrel",
"ground hog", "hawk", "flying squirrel", "pug", "fox", "coyote", "turtle"]
channel.send(animals[Random.new.rand(0..14)])
end
end
@ryanwarsaw
ryanwarsaw / bcrypt.js-heroku-test.log
Last active February 9, 2017 18:09
Comparison of bcrypt.js performance on i7 4960HQ vs Heroku hardware 🤔
~ $ npm test
> bcryptjs@2.4.3 test /app
> node node_modules/testjs/bin/testjs
|_ _ _|_
|_(-_)|_ test.js v1.0.4
+ bcryptjs.encodeBase64 0.866 ms 1 assertions
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network :forwarded_port, host: 3500, guest: 3500 # Thimble
config.vm.network :forwarded_port, host: 5432, guest: 5432 # Postgres
config.vm.network :forwarded_port, host: 2015, guest: 2015 # publish.webmaker.org
config.vm.network :forwarded_port, host: 8001, guest: 8001 # Published projects
config.vm.network :forwarded_port, host: 1234, guest: 1234 # id.webmaker.org
config.vm.network :forwarded_port, host: 3000, guest: 3000 # login.webmaker.org
Ryans-MacBook-Pro:login.webmaker.org ryanwarsaw$ npm install
npm WARN deprecated nunjucks@0.1.10: potential XSS vulnerability in autoescape mode, and with escape filter was fixed in v2.4.3
npm WARN deprecated less-middleware@0.1.15: Updated API and improved functionality.
npm WARN deprecated sequelize@1.7.10: security/injection issue with limit/offset fixed in 3.17.0
npm WARN deprecated MD5@1.0.3: deprecated, use lowercase 'md5@2.x' from now on
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated node-uuid@1.4.7: use uuid module instead
npm WARN engine hawk@0.10.2: wanted: {"node":"0.8.x"} (current: {"node":"4.4.7","npm":"2.15.8"})
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version
Ryan Warsaw@RYANS-DESKTOP MINGW64 ~/documents/brackets (master)
$ npm run build
> Brackets@1.4.0-0 build C:\Users\Ryan Warsaw\documents\brackets
> grunt build-browser
Running "jshint:src" (jshint) task
>> 307 files lint free.
Running "clean:dist" (clean) task