Skip to content

Instantly share code, notes, and snippets.

View 2jacobtan's full-sized avatar

Jacob Tan En 2jacobtan

View GitHub Profile
@2jacobtan
2jacobtan / varmilo keyboard.md
Created August 10, 2022 15:44 — forked from vladak/varmilo keyboard.md
Varmilo keyboard details
@2jacobtan
2jacobtan / falsehoods-programming-time-list.md
Created July 14, 2021 15:29 — forked from timvisee/falsehoods-programming-time-list.md
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).

Idiot-Proof Git Aliases

How do I clone a GitHub wiki?

Any GitHub wiki can be cloned by appending wiki.git to the repo url, so the clone url for the repo https://myorg/myrepo/ is: git@github.com:myorg/myrepo.wiki.git (for ssh) or https://github.com/my/myrepo.wiki.git (for https).

You make edits, and commit and push your changes, like any normal repo. This wiki repo is distinct from any clone of the project repo (the repo without wiki.get appended).

How do I add images to a wiki page?

@2jacobtan
2jacobtan / trolling_haskell
Last active July 2, 2021 21:12 — forked from quchen/trolling_haskell
Trolling #haskell
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF
| FUCKIN PUSSIES
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS
13:16 <luite> | hello
13:16 <ChongLi> | somebody has a mental illness!
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel
| compelled to write Node.js!
13:16 <genisage> | hi
13:16 <luite> | you might be pleased to learn that you can compile
| haskell to javascript now
@2jacobtan
2jacobtan / emotions.md
Created March 20, 2021 16:51 — forked from Gabriella439/emotions.md
How to get in touch with your emotions

How to get in touch with your emotions

I wanted to share something I've learned in the course of therapy that I felt might benefit others. Specifically, I'd like to share how to better listen to one's emotions.

Why should we do this?

You might wonder why would we want to be in better touch with our emotions. One reason why is that everybody builds a metaphor or narrative for themselves

import Data.Function ( (&), fix )
import Data.List (foldl')
-- top-down
fib n = snd $ go n
where
-- go :: Int -> (Int,Int)
go 0 = (0,0)
go 1 = (0,1)
go x = (b,a+b)
#nullable enable
using System;
using System.IO;
namespace jt2.debug_helper_extensions
{
static class To_json_extensions
{
static string docPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
//try at https://dotnetfiddle.net/KvNhXi
#nullable enable
using System;
using System.Linq;
using System.Numerics;
using System.Globalization;
using static MyNamespace.ConsoleOutputHelpers;
@2jacobtan
2jacobtan / FizzBuzz_func.hs
Last active June 10, 2020 02:11
FizzBuzz via function composition
-- from https://www.youtube.com/watch?v=FyCYva9DhsI&t=21m03s
-- NDC conference talk: Clean Coders Hate What Happens to Your Code When You Use These Enterprise Programming Tricks
import Data.List (foldl')
import Data.List (intersperse)
import Data.Function ((&))
fizzbuzz :: Integer -> String
fizzbuzz n = fizz (buzz id) $ show n
where