Skip to content

Instantly share code, notes, and snippets.

View mstksg's full-sized avatar

Justin Le mstksg

View GitHub Profile
@ezyang
ezyang / haskell-on-windows.md
Last active November 17, 2016 00:00
Haskell on Windows for Linux refugees

Haskell on Windows

These are empirical observations about running Haskell on Windows. If your experiences have been different, I'd love to hear about it.

Install

You'll need to get the

anonymous
anonymous / GAME_MASTER_v0_1.protobuf
Created July 16, 2016 16:31
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {
{-# language DataKinds, PolyKinds, ScopedTypeVariables, UndecidableInstances,
FlexibleInstances, FlexibleContexts, GADTs, TypeFamilies, RankNTypes,
LambdaCase, TypeOperators, ConstraintKinds #-}
import GHC.TypeLits
import Data.Proxy
import Data.Singletons.Prelude
import Data.Singletons.Decide
import Data.Constraint
@dbp
dbp / circle.yml
Last active June 29, 2017 09:53
Haskell project with Stack on CircleCI
dependencies:
cache_directories:
- "~/.stack"
pre:
- wget https://github.com/commercialhaskell/stack/releases/download/v0.1.2.0/stack-0.1.2.0-x86_64-linux.gz -O /tmp/stack.gz
- gunzip /tmp/stack.gz && chmod +x /tmp/stack
- sudo mv /tmp/stack /usr/bin/stack
override:
- stack setup
- stack build
@non
non / answer.md
Last active January 9, 2024 22:06
answer @nuttycom

What is the appeal of dynamically-typed languages?

Kris Nuttycombe asks:

I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?

I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.

I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.

diff -urN htop-1.0.3-orig/CRT.c htop-1.0.3/CRT.c
--- htop-1.0.3-orig/CRT.c 2014-11-04 14:10:29.500604247 +0100
+++ htop-1.0.3/CRT.c 2014-11-04 14:11:01.916663508 +0100
@@ -60,6 +60,9 @@
UPTIME,
BATTERY,
TASKS_RUNNING,
+ TEMPERATURE_COOL,
+ TEMPERATURE_MEDIUM,
+ TEMPERATURE_HOT,
@eungju
eungju / otp.hs
Last active December 21, 2022 11:09
Google Authenticator in Haskell
#!/usr/bin/env runghc
import qualified Codec.Binary.Base32 as Base32
import Codec.Utils (i2osp, fromTwosComp)
import qualified Control.Arrow as Arrow
import Data.Bits
import Data.Char
import Data.Functor
import Data.HMAC
import Data.List.Split
@miguelmota
miguelmota / README.md
Last active March 16, 2024 12:52
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
@rstemmer
rstemmer / htop-1.0.2-temperature.patch
Created March 23, 2013 13:32
Adds a new Meter to htop that displays your core temperatures. You need the lm_sensors package to use this meter. After applying this patch, you have to call ./autogen.sh before configuring and compiling.
diff -urN htop-1.0.2-orig/CRT.c htop-1.0.2/CRT.c
--- htop-1.0.2-orig/CRT.c 2013-03-23 14:10:29.500604247 +0100
+++ htop-1.0.2/CRT.c 2013-03-23 14:11:01.916663508 +0100
@@ -59,6 +59,9 @@
UPTIME,
BATTERY,
TASKS_RUNNING,
+ TEMPERATURE_COOL,
+ TEMPERATURE_MEDIUM,
+ TEMPERATURE_HOT,
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname