Skip to content

Instantly share code, notes, and snippets.

View crullian's full-sized avatar
🐢
I'm a dinosaur

Chris Gullian crullian

🐢
I'm a dinosaur
View GitHub Profile
@crullian
crullian / index.html
Created November 24, 2013 23:56
Housekeeping 2
<!DOCTYPE html>
<html>
<head>
<title>Housekeeping</title>
<style type="text/css">
h1 {
position:absolute;left:90px;top:50px;
font-size:88px;
font-family:Didot;
}
function ArrayAdditionI(arr) {
arr.sort(function(a, b) {
return a - b;
});
var largest = arr[arr.length - 1]; // Set largest to last (largest) array value
@crullian
crullian / MontyHall.js
Created January 9, 2015 19:55
The Monty Hall Problem
function monty() {
var runProblem = 1000;
var switchWins = 0; // = change answer
var switchLosses = 0;
var holdWins = 0; // = keep user_choice
var holdLosses = 0;
for (var i = 1; i <= runProblem; i++) {
// random user choice (what door they picked)

Keybase proof

I hereby claim:

  • I am crullian on github.
  • I am crullian (https://keybase.io/crullian) on keybase.
  • I have a public key whose fingerprint is 8DB7 8535 A780 BB09 D979 F9B5 3292 4172 FF92 0B7D

To claim this, I am signing this object:

@crullian
crullian / gist:9070b6c514581ba2df09
Created March 7, 2016 20:19
GemSafe JS Re-Arch Update
Application Process - about 12 hrs left
Still need to work out a bug in the review step where an upload view link isn't functioning properly
Need to set up beforeunload when trying to navigate away from unfinished/unsaved application
Analytics - about 8hrs
Pardot stuff needs to be properly set up and tested (if possible)
Google Analytics needs to be properly set up and tested
Then while the application process is being thoroughly tested, we'll set forth with the implementation of the Edit process.
This should take arould 16hrs, and re-use a lot of the application logic/functionality with a few tweaks

#Translating Marty to Redux

Some people have asked how I've translated a Marty app to Redux. Once you get your head around how Redux works I found concepts in Marty translated easily. Below is side-by-side comparison of the two libraries to help you along the way.

Also if you're looking for some devtools, check out redux-devtools.

##Constants

Marty

@crullian
crullian / emberExample.js
Created September 17, 2016 17:20
Comparing React and Ember
var LikeButton = Ember.View.extend({
init: function() {
this._super()
this.set('liked', false};
},
likedText: function(){
return(this.get('liked') ? 'like' : 'unlike')
}.property('liked'),
click: function(event) {
@crullian
crullian / nodeHost.txt
Created November 12, 2016 04:28
Node on Dreamhost
1) Make a download dir to store the node source and download it.
mkdir downloads
cd downloads
git clone https://github.com/joyent/node.git
Find the latest version
2) List all of the tags in the repository, and check out the most recent.
git tag
git checkout v0.9.9
# Shell prompt based on the Solarized Dark theme.
# Screenshot: http://i.imgur.com/EkEtphC.png
# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles
# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing.
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM='gnome-256color';
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM='xterm-256color';
fi;
# Shell prompt based on the Solarized Dark theme.
# Screenshot: http://i.imgur.com/EkEtphC.png
# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles
# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing.
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM='gnome-256color';
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM='xterm-256color';
fi;