This file contains 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
#lang racket | |
(define (fizzbuzz n limit) | |
(cond | |
((eq? (modulo n 15) 0) | |
(printf "~a: FizzBuzz~n" n)) | |
((eq? (modulo n 3) 0) | |
(printf "~a: Fizz~n" n)) | |
((eq? (modulo n 5) 0) | |
(printf "~a: Buzz~n" n))) |
This file contains 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
#!/usr/bin/env sh | |
gem update | |
brew update | |
brew upgrade | |
upgrade_oh_my_zsh |
This file contains 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
.heart { | |
font-size: 200pt; | |
line-height: 0.9; | |
text-align: center; | |
color: red; | |
-webkit-animation:beat 0.6s infinite; /* Chrome, Safari, Opera */ | |
-moz-animation:beat 0.6s infinite; | |
animation:beat 0.6s infinite; | |
} |
This file contains 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
/** | |
* Increment number represented in array | |
* | |
* E.g. Take [1, 2, 3] increment to [1, 2, 4] | |
* @param {[Number]} arr Array to increment | |
* @return {[Number]} Array of numbers | |
*/ | |
function increment(arr) { | |
for(var i = arr.length - 1; i >= 0; i--) { | |
if(arr[i] === 9) { |
This file contains 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
/** | |
* Find all possible sum of cubes for a particular number | |
* @param {Number} Number to find all sum of cube pairs | |
* @return {Array} Array of sum of cubes | |
*/ | |
function findAllPossiblePairs(n) { | |
var doneFinding = false; | |
var i = 1; | |
var found = []; | |
var j = Math.floor(Math.pow(n, 1/3)); |
This file contains 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 hello() { | |
console.log('hello from a github gist'); | |
} | |
module.exports = hello; |
This file contains 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
/** | |
* Format a string with values from the provided object. | |
* | |
* @param {string} template - String with {} denoted keys. (See example) | |
* @param {object} args - Key/value pairs matching the holes in the template. | |
* @return {string} | |
* | |
* @example | |
* format('This is a {language} ({abbr}) codebase.', { | |
* language: 'JavaScript', |
This file contains 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
/** | |
* Assignment 1 - COMP 4002 | |
* Part 1: Task 1 and 2 | |
* | |
* Single and recursive triangles - no shaders | |
* | |
* Ryan Seys - 100817604 | |
* | |
* Compile on Mac with: | |
* $ g++ assign1.cpp -o assign -framework OpenGL -framework GLUT && ./assign |
This file contains 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
/** | |
* Assignment 1 - COMP 4002 | |
* | |
* Includes: | |
* Part II: Task 3 and Task 4 | |
* Part III: Colouring bonus - recursive triangle is coloured. | |
* Part IV: Displacement parameter “dispX” | |
* | |
* Single and recursive triangles - with shaders | |
* |
This file contains 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
#!/bin/sh | |
set -e | |
# Create image for deployment with Dokku | |
USERNAME=user # this is the user you will use to ssh into the server with | |
DOMAIN=example.com | |
echo 'Updating server...' | |
OlderNewer