Skip to content

Instantly share code, notes, and snippets.

View johnhamelink's full-sized avatar
🔨
Building

John Hamelink johnhamelink

🔨
Building
View GitHub Profile
@rangeoshun
rangeoshun / config.el
Last active June 12, 2023 15:45
Typescript with CSS in JS (styled-components, Emotion), JSX and graphql highlight and major mode for Emacs Doom with `mmm-mode` for *.tsx
;; Assign typescript-mode to .tsx files
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-mode))
(require 'mmm-mode)
(setq mmm-global-mode t)
(setq mmm-submode-decoration-level 0) ;; Turn off background highlight
;; Add css mode for CSS in JS blocks
(mmm-add-classes
'((mmm-styled-mode
@jclosure
jclosure / tabbar-projectile-support.el
Created April 28, 2019 09:24
Emacs - make tabbar groups based on projectile project membership
;; Make tabbar groups based on projectile project membership
;;; Nice hack of the group function;; Make tabbar groups based on projectile project membership to add projectile aware-ness.
;;; Assign buffer with group name projectile project name if
;;; the buffer is within the project and associated to a file or process.
(use-package tabbar :ensure t
:after projectile
:config
(defun tabbar-buffer-groups ()
@cryzed
cryzed / fix-infinality.md
Last active January 19, 2024 08:56
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@localshred
localshred / Makefile
Last active January 30, 2016 14:13
Makefile useful in an Elixir project that uses watchman-make for fun and profit.
SHA = "HEAD"
WATCH_TARGET = "test"
ifdef sha
SHA = $(sha)
endif
ifdef t
WATCH_TARGET = $(t)
endif
@plamb
plamb / gce_auth.ex
Last active December 9, 2020 14:31
Authenticate with Google Cloud using service account json key and Elixir
# https://developers.google.com/identity/protocols/OAuth2ServiceAccount
key_json = File.read!("some-service-account-key-file.json")
key_map = JOSE.decode(key_json)
jwk = JOSE.JWK.from_pem(key_map["private_key"])
jws = %{"alg" => "RS256"}
header = %{
@pascalpoitras
pascalpoitras / config.md
Last active April 8, 2024 18:58
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@railwaycat
railwaycat / Emacs_starter.pl
Last active March 12, 2023 01:26
Start Emacs.app from CLI
#!/usr/bin/perl
# Emacs starter for Emacs mac port
# Thanks to Aquamacs Project and David Reitter
my $args = "";
my $tmpfiles = "";
for my $f (@ARGV) {