Skip to content

Instantly share code, notes, and snippets.

const winners = new Set();
const contestants = ['A', 'B', 'C', 'D', 'E', 'F'];
while (winners.size < 3) {
const randomNumber = Math.floor(Math.random() * contestants.length);
console.log(randomNumber);
winners.add(contestants[randomNumber]);
}
@btiwaree
btiwaree / homepage
Last active September 17, 2021 11:08
Aloha 👋🏼

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
/*
** showip.c -- show IP addresses for a host given on the command line
*/
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <arpa/inet.h>