Skip to content

Instantly share code, notes, and snippets.

View brunoparga's full-sized avatar

Bruno Parga brunoparga

View GitHub Profile
module.exports = {
env: {
browser: true,
es6: true,
'jest/globals': true
},
extends: [
'eslint:recommended',
'hardcore',
'plugin:jest/recommended',
@brunoparga
brunoparga / cabal terminal output
Last active July 4, 2019 17:43
My issues running course materials with cabal
I'm following the book instructions to try and get their repo set up. My current GHC version is 8.0.2.
Here's what I did, as per the instructions:
$ cabal update
$ cabal get hid-examples
-- seems to work OK, I get the package in its own directory.
$ cabal sandbox init
-- seems to work OK, I have a cabal.sandbox.config and a .cabal-sandbox file in my directory
@brunoparga
brunoparga / bmp.h
Created April 29, 2016 21:26
Problem "resize" from problem set 4 of CS50x course
/**
* bmp.h
*
* Computer Science 50
* Problem Set 4
*
* BMP-related data types based on Microsoft's own.
*/
#include <stdint.h>
@brunoparga
brunoparga / greedy-output.c
Created February 8, 2016 03:31
A snippet from the program to make change
// Corrects grammar
string q_gram = (quarters == 1) ? "quarter" : "quarters";
string d_gram = (dimes == 1) ? "dime" : "dimes";
string n_gram = (nickels == 1) ? "nickel" : "nickels";
string p_gram = (pennies == 1) ? "penny" : "pennies";
// Outputs the change
printf("Your change is: ");
if (quarters != 0)
{