Skip to content

Instantly share code, notes, and snippets.

View randomer's full-sized avatar
🍳
Omelette du Fromage

Rod randomer

🍳
Omelette du Fromage
View GitHub Profile
@daniepetrov
daniepetrov / fix.md
Last active January 15, 2021 12:14
How to Fix Blurry Fonts in MacOS Mojave / Catalina for Non-Retina Displays
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO
defaults -currentHost write -globalDomain AppleFontSmoothing -int 1

Light font smoothing defaults command (my selection):

defaults -currentHost write -globalDomain AppleFontSmoothing -int 1
@epequeno
epequeno / Blue.elm
Last active April 6, 2023 21:02
example of multiple elm apps on a single page
-- Elm 0.19.0
module Blue exposing (main)
import Html exposing (..)
main =
div [] [ text "Hello from Blue!" ]
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active July 2, 2024 20:44
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@ibraheem4
ibraheem4 / postgres-brew.md
Last active June 28, 2024 18:57 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@zkessin
zkessin / Main.elm
Last active April 2, 2024 20:17
Elm Architecture Hello world
module Main exposing (..)
{-
********************************************************************************
Copyright 2016 Zachary Kessin
Released under the BSD3 licence
Test your Code for better code quiality
http://elm-test.com/?utm_source=gist&utm_content=template
@cscalfani
cscalfani / elmInNode.md
Last active April 6, 2020 20:57
Elm in Node (0.17)

Elm in Node (0.17)

Why?

Sharing code between the client and the server in a Universal Javascript application is a big gain. No more are the days of rewriting code for the server.

But moving from Javascript to Elm in the front end can feel like a move backwards. So much of the code we write is environment independent. And it would be great if we could leverage some of the front end logic on the backend.

How?

@Rich-Harris
Rich-Harris / service-workers.md
Last active July 1, 2024 06:33
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

@JadenGeller
JadenGeller / ClockController.swift
Last active September 2, 2016 17:12
Clock Controller
import Foundation
// Controller that evokes its callback every minute
class ClockController {
private let minuteCallback: NSDate -> ()
init(minuteCallback: NSDate -> ()) {
self.minuteCallback = minuteCallback
callbackAndReschedule()
}
@yang-wei
yang-wei / destructuring.md
Last active February 20, 2024 04:40
Elm Destructuring (or Pattern Matching) cheatsheet

Should be work with 0.18

Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !

Tuple

myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))
@paragonie-scott
paragonie-scott / crypto-wrong-answers.md
Last active April 21, 2024 23:48
An Open Letter to Developers Everywhere (About Cryptography)