Skip to content

Instantly share code, notes, and snippets.

View phthhieu's full-sized avatar

Hieu Pham (Andromeda / Platform Pillar) phthhieu

View GitHub Profile
@donnfelker
donnfelker / android-19-circle.yml
Last active March 12, 2021 13:19
Sample CircleCI Configuration For an Android App
#
# Build configuration for Circle CI
#
general:
artifacts:
- /home/ubuntu/your-app-name/app/build/outputs/apk/
machine:
environment:
@JeffPaine
JeffPaine / i3-cheat-sheet.md
Last active June 27, 2025 15:19
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (alt by default)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
@iamsaso
iamsaso / index.html
Last active September 21, 2022 11:04
GraphiQL with JWT
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: 100%;
margin: 0;
width: 100%;
overflow: hidden;
}
@busypeoples
busypeoples / PhantomTypeReasonML.md
Last active February 6, 2024 21:29
Phantom types in ReasonML

Phantom types in ReasonML

Introduction

"A phantom type is a parametrised type whose parameters do not all appear on the right-hand side of its definition..." Haskell Wiki, PhantomType

The following write-up is intended as an introduction into using phantom types in ReasonML.

Taking a look at the above definition from the Haskell wiki, it states that phantom types are parametrised types where not all parameters appear on the right-hand side. Let's try to see if we can implement a similar example as in said wiki.

@karubabu
karubabu / .Xmodmap
Created November 4, 2017 17:29
dvorak settings
keycode 8 =
keycode 10 = 1 exclam
keycode 11 = 2 at at
keycode 12 = 3 numbersign
keycode 13 = 4 dollar dollar
keycode 14 = 5 percent
keycode 15 = 6 asciicircum
keycode 16 = 7 ampersand braceleft
keycode 17 = 8 asterisk bracketleft
keycode 18 = 9 parenleft bracketright
@dferber90
dferber90 / visual-regression-testing.md
Last active July 2, 2023 08:45
Visual Regression Testing in Jest

Visual Regression Testing with Jest

This is a walkthrough of how to set up Visual Regression Testing with Jest for an application created with create-react-app.

The following walkthrough uses React as an example, but the approach should work for any modern frontend library! I assume it can be used with Angular, Vue, Cycle.js and more.

This gist walks you through a create-react-app application as an example of how to set up Visual Regression Testing in Jest using libraries I wrote recently which enable this: jsdom-screenshot, jest-transform-css and jest-transform-file.

@viral-sh
viral-sh / lesserKnown.js
Last active June 28, 2021 01:19
A list of lesser know syntaxes and features of JavaScript
// void operator
void 0 // returns undefined
void (0) // returns undefined
void 'abc' // returns undefined
void {} // returns undefined
void (1 === 1) // returns undefined
void (1 !== 1) // returns undefined
void anyfunction() // returns undefined
@blrobin2
blrobin2 / ord-sorts.js
Last active June 12, 2022 09:26
Ord-based Bubble, Merge, and Quick Sort
// A demonstration of sorting objects with Ord instances
// equals :: Setoid a => a ~> a -> Boolean
// lte :: Ord a => a ~> a -> Boolean
/*
* Data Constructors, and their Setoid and Ord instances
*/
// I'm using the daggy library to make constructors https://github.com/fantasyland/daggy
const daggy = require('daggy')
@swlaschin
swlaschin / fsharpjobs.md
Last active January 27, 2025 07:24
My suggestions on how to look for F# jobs

How to find F# jobs

People often ask me how to find F# jobs. I don't have any special connections to companies using F#, and I don't have any special tricks either. I wish I did!

So, given that, here's my take on F# jobs.

Job hunting

For job hunting my suggestions are:

@toan2406
toan2406 / Post.re
Last active July 14, 2020 06:39
A Post component which fetches and displays title
open Relude.Globals;
module R = Relude;
let (>>=) = IO.(>>=);
let fetchPostById: string => IO.t(string, string) =
id =>
Fetch.fetch("https://jsonplaceholder.typicode.com/posts/" ++ id)
|> Js.Promise.then_(Fetch.Response.text)