A Pen by Tuan Duong on CodePen.
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
const fetch = require("node-fetch"); | |
import { GraphQLClient } from "graphql-request"; | |
const { customAlphabet } = require("nanoid"); | |
import { CREATE_GREETING_MUTATION, GET_USER_QUERY } from "../Queries"; | |
const alphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv"; | |
const sgMail = require("@sendgrid/mail"); |
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
{id: 10, createdBy: {id: 50}, dateCreated: "2017-10-26T14:08:33Z", lastUpdated: "2017-10-26T14:08:33Z",…} | |
changeVersion | |
: | |
0 | |
copyChildrenIds | |
: | |
null | |
copyParent | |
: | |
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
def crazy_nums(max) | |
less_than_max_num_array = [] | |
(0..(max-1)).each do |i| | |
less_than_max_num_array.push(i) | |
end | |
divisible_numbers = [] | |
less_than_max_num_array.each do |i| | |
if((i % 3 === 0) || (i % 5 === 0)) #AND ARE divisible by either three or five | |
if((i % 5 === 0) && (i % 3 === 0)) #BUT ARE NOT divisible by _both_ three and five |
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
def check_less_than_max_nums(max) | |
less_than_max_num_array = [] | |
(0..(max-1)).each do |i| | |
less_than_max_num_array.push(i) | |
end | |
return less_than_max_num_array | |
end | |
def check_divisible_by_three_five (numbers) |
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
import React from 'react'; | |
import ChatLine from './chat-line'; | |
const ChatLog = React.createClass({ | |
getInitialState: function() { | |
console.log('initial state'); | |
return { lines: [] }; | |
}, | |
addMessage: function(msg) { |
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
# Quicker navigation | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias ....="cd ../../.." | |
alias .....="cd ../../../.." | |
# Shortcuts to my Code folder in my home directory | |
alias code="cd ~/Code" | |
alias sites="cd ~/Code/sites" |
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> | |
<html> | |
<head> | |
<title>DOM manipulation with jQuery</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script type="text/javascript" src="gps.js"></script> | |
</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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | |
<style> | |
body{ | |
background: #ffffff; | |
color: #000080; | |
} | |
a{ | |
color: #800080; |
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
class BoggleBoard | |
def initialize(dice_grid) | |
@dice_grid = dice_grid | |
end | |
def create_word (*coords) | |
coords.map { |coord| @dice_grid[coord.first][coord.last]}.join("") | |
end |
NewerOlder