1 - Install imagemagick
- Mac:
brew install imagemagick - Ubuntu Linux: Follow this guide
- If you are on windows, these instructions should work on WSL (windows subsystem for linux)
1- Save the following script as split-icons.sh
| function loadFont(container) { | |
| const familiarsFont = new FontFace( | |
| "Junction Regular", | |
| "url(https://cors-anywhere.herokuapp.com/https://cdn.discordapp.com/attachments/617372365520896027/892619268854792202/FamIo8.ttf)" | |
| ); | |
| familiarsFont | |
| .load() | |
| .then(loaded_face => document.fonts.add(loaded_face)) | |
| .catch(() => | |
| console.log( |
| // create-react-app typescript WSL | |
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "chrome", | |
| "request": "launch", | |
| "name": "Launch Chrome", | |
| "url": "http://localhost:3000", | |
| "webRoot": "${workspaceRoot}/src", |
1 - Install imagemagick
brew install imagemagick1- Save the following script as split-icons.sh
| module Jekyll::CustomFilter | |
| def formatted_date(date) | |
| # date = Time.parse(string_date) | |
| ending = 'th' | |
| case date.day % 10 | |
| when 1 | |
| ending = 'st' | |
| when 2 | |
| ending = 'nd' | |
| when 3 |
const s = "";
for(let i=0; i < 76; i++1){
if(i % 16 === 0) s += "\n";
s += String.fromCharCode(47 + i);}
| #include<stdlib.h> | |
| #include<stdio.h> | |
| struct Node { | |
| int data; | |
| struct Node *both; | |
| }; | |
| // https://stackoverflow.com/a/26569748 | |
| struct Node * xor(struct Node *m, struct Node *n){ |
| function encode(p, p2) { | |
| let t = 0; | |
| t = (t << 6) | p; | |
| t = (t << 6) | p2; | |
| return t; | |
| } | |
| function decode(s) { | |
| return [s & (2 ** 6 - 1), s >> 6]; | |
| } |
| ////////////////// | |
| // basic Trie implementation | |
| ////////////////// | |
| function Trie() { | |
| this.head = { key: '', children: {} } | |
| } | |
| Trie.prototype.add = function (key) { |
| // day 1 | |
| const day1part1 = s => s | |
| .split('') | |
| .filter((el,i,A)=>(el===A[(i+1) % A.length] )) | |
| .reduce((p,n)=>p+(+n),0) | |
| const day1part2 = s => s | |
| .split('') | |
| .filter((el,i,A)=>(el===A[(i+A.length/2) % A.length])) | |
| .reduce((p,n)=>p+(+n),0) |
| defmodule ElixirPlayground.DayOne do | |
| @input "./lib/elixir_playground/input/day1.txt" | |
| defp parseInput do | |
| @input | |
| |> File.read! | |
| |> String.trim | |
| |> Kernel.to_charlist | |
| end |