Skip to content

Instantly share code, notes, and snippets.

View johnjcamilleri's full-sized avatar

John J. Camilleri johnjcamilleri

View GitHub Profile
@johnjcamilleri
johnjcamilleri / site.hs
Created August 25, 2017 06:58
Hakyll issues
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
import Data.Monoid (mappend)
import Hakyll
--------------------------------------------------------------------------------
main :: IO ()
main = hakyll $ do
match "images/*" $ do
@johnjcamilleri
johnjcamilleri / dependencies.sh
Created June 25, 2018 07:24
Produce dependencies graph for Haskell project
#!/bin/sh
# Produce PNG of module dependencies (requires GraphViz `dot` command)
# John J. Camilleri, 2018
# Configurable options
dotfile="_deps.dot"
imgfile="_deps.png"
searchin="src"
john@Maqrut:~/repositories/GF$ time split/run.sh -y
GF repository split script
Usage: run.sh [-d PATH] [-y]
# pristine
Pulling...
Cleaning...
# gf-core
Copying...
@johnjcamilleri
johnjcamilleri / atom-selection-mode.md
Last active April 17, 2019 09:28
Atom selection mode feature

This is a hand-rolled alternative to the plugin https://github.com/jeffgran/atom-selection-mode.

My two major requests which that plugin doesn't support are:

  1. Do not deselect when tabbing
  2. Have an indicator when selection mode is on

My version does both these and is a bit simpler, but also less versatile/general. But it fills my need, and maybe someone else's too.

To get it to work, just paste the bits in the relevant files. Maybe I'll package it into a plugin one day.

@johnjcamilleri
johnjcamilleri / mkpngs.sh
Last active September 30, 2019 09:59
Convert FontAwesome's SVG icons to PNG
#!/bin/sh
# Convert all FontAwesome SVGs to PNGs
#
# Instructions:
# 1. Download FontAwesome's desktop package & extract
# 2. Save this script to the root folder & make it executable
# 3. (Optional) Choose conversion method below
# 4. Run! (takes a few minutes to get through the whole collection)
@johnjcamilleri
johnjcamilleri / mmap
Last active October 18, 2021 11:40
macOS man pages
MMAP(2) BSD System Calls Manual MMAP(2)
NAME
mmap -- allocate memory, or map files or devices into memory
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <sys/mman.h>