Skip to content

Instantly share code, notes, and snippets.

{
// workbench
"workbench.settings.editor": "json",
"workbench.settings.useSplitJSON": true,
"workbench.editor.enablePreview": false,
"workbench.startupEditor": "newUntitledFile",
"workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "Dracula At Night",
"workbench.colorCustomizations": {
"editorCursor.foreground": "#ffff00"
alias help="tldr"
alias top="sudo htop"
alias yt="youtube-dl"
alias reload="source ~/.zshrc"
alias finder="open -a Finder ./"
alias weather="curl -4 https://wttr.in/Brussels"
alias cat='bat'
alias md='mkdir -p'
alias please=sudo
alias d='dirs -v | head -10'

Hello

this is an example file

const text = 'Hi team :wave ! Espen , Jon and Eva are thrilled to have you back and working with us . VIBBIO 4ever :heart !'
const chopped = text.split(" ")
const Espen = [] // [ 'Hi', '!', 'Jon', 'are', 'have', 'and', 'us', '4ever' ] 
const Jon = [] // [ 'team', 'Espen', 'and', 'thrilled', 'you', 'working', '.', ':heart' ] 
const Eva = [] // [ ':wave', ',', 'Eva', 'to', 'back', 'with', 'VIBBIO', '!' ] 
for (let i = 0; i < chopped.length; i+=3) {
Espen.push(chopped[i])
Jon.push(chopped[i+1])
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// generate new jpg files from recovered data
// accept exactly one command-line argument (img filename)
// if not one arg, print error message and return 1
// if cannot open file also return 1
// files should be named ###.jpg starting with 000.jpg
// use malloc and free
#include <stdio.h>
#include <cs50.h>
#include <math.h>
// quarters (25¢), dimes (10¢), nickels (5¢), and pennies (1¢)
int main(void)
{
int quarter = 25;
int dime = 10;
#include <stdio.h>
#include <cs50.h>
#include <math.h>
// quarters (25¢), dimes (10¢), nickels (5¢), and pennies (1¢)
// input of 0.41 yields output of 4
int coins = 0;
int get_change(int cents_remaining, int coin_value)
{
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <cs50.h>
// plaintext (p) vs ciphertex (c), and a key (k)
// “rotate” each (alphabetical) character by k positions
// Your program must accept a single command-line argument, a non-negative integer
// Your program must preserve case
#include <stdio.h>
#include <cs50.h>
#include <math.h>
#include <string.h>
#include <ctype.h>
// Coleman-Liau index
// L (avg num of letters/100 words)
// S (avg num of sentences/100 words)
// a letter is any uppercase or lowercase alphabetic character
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <cs50.h>
// plaintext (p) vs ciphertex (c), and a key (k)
// “rotate” each (alphabetical) character by k positions
// Your program must accept a single command-line argument, a non-negative integer
// Your program must preserve case