Skip to content

Instantly share code, notes, and snippets.

View alessbell's full-sized avatar

Alessia Bellisario alessbell

View GitHub Profile
View stage.tsx
// TODO: make `pages` optional and measure the div when unspecified, this will
// allow more normal document flow and make it easier to do both mobile and
// desktop.
import {
createContext,
useCallback,
useContext,
useEffect,
useMemo,
useRef,
View SpotifyPuzzle.js
const paragraph =
'If you want to jumpstart the process of talking to us about this role, here’s a little challenge: write a program that outputs the largest unique set of characters that can be removed from this paragraph without letting its length drop below 50.';
// First we'll take the set of unique characters
const uniqueCharacters = str => {
const chars = [];
str.split('').forEach(char => {
if (!chars.includes(char)) {
chars.push(char);
@alessbell
alessbell / hooks.md
Last active December 18, 2019 18:43
View hooks.md
View pen-plotter-cubic-disarray-rainbow.js
/**
* A Canvas2D + SVG Pen Plotter example of "Cubic Disarray"
* (a recreation of an artwork by Georg Nees in 1968-71).
*
* @author Stephane Tombeur (https://github.com/stombeur)
*/
const canvasSketch = require("canvas-sketch");
const { polylinesToSVG } = require("canvas-sketch-util/penplot");
const pickRandom = require("canvas-sketch-util/random");
View sampleCCIConfig.yml
version: 2.1
orbs:
cypress: cypress-io/cypress@1
slack: circleci/slack@3.3.0
workflows:
run_cypress:
triggers:
- schedule:
cron: "30 11 * * *"
View tic-tac-toe.js
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
let board = [[' ', ' ', ' '], [' ', ' ', ' '], [' ', ' ', ' ']];
let currentPlayer = 'x';
const charMap = {
A: 0,
View cracklepop.js
// cracklepop.js
let message;
const arr = [...Array(101).keys()];
arr.shift();
arr.forEach((num) => {
if (!(num % 3) && !(num % 5)) {
message = 'CracklePop';
} else if (!(num % 3)) {
@alessbell
alessbell / config.yml
Last active October 25, 2018 18:11
Sample CCI job config: record test failure in env variable, persist test-results to workspace and run Danger in subsequent job
View config.yml
jobs:
execute_test_runner:
steps:
- attach_workspace:
at: /root/workspace
- run:
name: Running test suite
command: |
if npm run test -- --outputFile test-results.json --json ; then
echo 'export TESTS_PASS=true' >> $BASH_ENV
View collaborative_writing.md

Collaborative Writing

Today you are going to write a short story but unfortunately, because of time constraints, you’ll need to enlist the help of your teammates.

Everyone in the group is going to clone this repository and one by one each of you will write the next sentence. In the end you will have a story that starts off with the sentence we give you and finishes with what you and your group writes.

This assignment is going to teach you how to collaborate on GitHub. This means cloning a repository, pulling the changes that other people have made, and pushing your changes up. You might even come across merge conflicts.

Assignment

  1. Everyone in the group clones this repository.