Skip to content

Instantly share code, notes, and snippets.

@Microtribute
Microtribute / US_State_Bounding_Boxes.csv
Created January 19, 2022 10:07 — forked from a8dx/US_State_Bounding_Boxes.csv
Bounding boxes for all US states and territories [NAD83]
STATEFP STUSPS NAME xmin ymin xmax ymax
1 01 AL Alabama -88.473227 30.223334 -84.88908 35.008028
2 02 AK Alaska -179.148909 51.214183 179.77847 71.365162
3 60 AS American Samoa -171.089874 -14.548699 -168.1433 -11.046934
4 04 AZ Arizona -114.81651 31.332177 -109.045223 37.00426
5 05 AR Arkansas -94.617919 33.004106 -89.644395 36.4996
6 06 CA California -124.409591 32.534156 -114.131211 42.009518
7 08 CO Colorado -109.060253 36.992426 -102.041524 41.003444
8 69 MP Commonwealth of the Northern Mariana Islands 144.886331 14.110472 146.064818 20.553802
9 09 CT Connecticut -73.727775 40.980144 -71.786994 42.050587
[Desktop Entry]
Version=1.0
Name=Telegram Desktop
Comment=Official desktop version of Telegram messaging app
TryExec=/opt/Telegram/Telegram
Exec=/opt/Telegram/Telegram -- %u
Icon=telegram
Terminal=false
StartupWMClass=TelegramDesktop
Type=Application
acks :: [[Int]]
acks = [ [ case (m, n) of
(0, _) -> n + 1
(_, 0) -> acks !! (m - 1) !! 1
(_, _) -> acks !! (m - 1) !! (acks !! m !! (n - 1))
| n <- [0..] ]
| m <- [0..] ]
main :: IO ()
main = print $ acks !! 4 !! 1
@Microtribute
Microtribute / README.md
Last active November 10, 2021 23:22
Remove the gap between the tab bar and the window edges and between pinned tabs and unpinned tabs in Firefox

Annoying Gap Removal in Firefox

Overview

Firefox by default gets shipped with redudant spaces (at least for me). This hack removes the gaps between:

  • the tab bar and the window edges
  • pinned tabs and unpinned tabs

How?

  • Set toolkit.legacyUserProfileCustomizations.stylesheets to true in about:config.
  • Create a folder named chrome inside the profile directory (find the Root Directory in about:profiles).
@Microtribute
Microtribute / README.md
Last active November 12, 2021 00:09
Haskell Environment Separate Installation

A few notes on haskell environment setup

GHC needs the following packages pre-installed:

sudo apt install gcc g++ build-essential curl libffi-dev zlib1g-dev libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5

It might be a good idea to stick to ghcup as it lets us know whenever an upgrade is available. For example:

@Microtribute
Microtribute / Neue-Haas-Unica-Pro.css
Last active December 27, 2022 15:00
Gmail Desktop Custom Style
/*
* @link https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#common_weight_name_mapping
*/
/*
* For this specific font we arrage the weights as follows:
* UltraLight 100
* Thin 200
* Light 300
* Regular 400
@Microtribute
Microtribute / Random-string
Created March 10, 2021 15:30 — forked from 6174/Random-string
Generate a random string in JavaScript In a short and fast way!
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
-- Extensible Records
-- given a record
x = { age = 42, name = "Boke" }
-- you can clone and remove a field in the process
{ x - age } -- { name = "Boke" }
-- you can also add a field
{ x | species = "Jade Dragon" } -- { age = 42, name = "Boke", species = "Jade Dragon" }
@Microtribute
Microtribute / bots.txt
Last active November 23, 2020 19:30
User Agents
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Flipboard/4.2.85
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Flipboard/4.2.90
Mozilla/5.0 (compatible; proximic; +https://www.comscore.com/Web-Crawler)
Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)
[FBAN/FBIOS;FBDV/iPhone11,6;FBMD/iPhone;FBSN/iOS;FBSV/13.6.1;FBSS/3;FBID/phone;FBLC/en_US;FBOP/5]
Java/1.8.0_171
Mozilla/5.0 (PlayStation; PlayStation 4/8.00) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15
Mozilla/5\.0 \(Linux; Android 9; SM\-N950F Build/PPR1\.180610\.011; wv\) AppleWebKit/537\.36 \(KHTML, like Gecko\) Version/4\.0 Chrome/84\.0\.4147\.125 Mobile Safari/537\.36 Instagram 156\.0\.0\.26\.109 Android \(28/9; 560dpi; 1440x2792; samsung; SM\-N950F; greatlte; samsungexynos8895; en_GB; 240726484\)
Mozilla/5.0 (compatible; adidxbot/2.0; +http://www.bing.com/bingbot.htm)
Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com
--
-- Filename: RedBlackTree.idr
-- Path: benbu-q
-- Created Date: Thu May 11 2017
-- Author: t-rel
--
-- Copyright (c) 2017 Microsoft
--
||| An implementation of red-black trees, using Idris' type system to enforce