Skip to content

Instantly share code, notes, and snippets.

Avatar

John J. Camilleri johnjcamilleri

View GitHub Profile
@johnjcamilleri
johnjcamilleri / mkpngs.sh
Last active Sep 30, 2019
Convert FontAwesome's SVG icons to PNG
View mkpngs.sh
#!/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 / atom-selection-mode.md
Last active Apr 17, 2019
Atom selection mode feature
View atom-selection-mode.md

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.

View gist:a6c43ff61f15a9657b457ac94ab7db61
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 / dependencies.sh
Created Jun 25, 2018
Produce dependencies graph for Haskell project
View dependencies.sh
#!/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"
View site.hs
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
import Data.Monoid (mappend)
import Hakyll
--------------------------------------------------------------------------------
main :: IO ()
main = hakyll $ do
match "images/*" $ do
View gist:94258db2143901903784a2c4109b4d27
This is now a view method. Call TextEditorElement::getHeight instead.
TextEditor.getHeight - <embedded>:5679:18
Object.toggle - /Users/john/.atom/packages/center-line/lib/center-line.coffee:44:25
atom-text-editor.atom.commands.add.center-line:toggle - /Users/john/.atom/packages/center-line/lib/center-line.coffee:11:26
CommandRegistry.handleCommandEvent - <embedded>:18901:35
<unknown> - <embedded>:18639:65
KeymapManager.dispatchCommandEvent - <embedded>:66514:22
This is now a view method. Call TextEditorElement::getHeight instead.
TextEditor.getHeight - <embedded>:5679:18
View activate-hs
#!/bin/sh
quiet=no
verbose=no
dryrun=no
list=no
version="" # forgiving user input version
hpVersion="" # like "2014.2.0.0"
@johnjcamilleri
johnjcamilleri / bard.json
Last active Aug 29, 2015
Examples of the data structure for the Minsel Etymological Dictionary
View bard.json
{
"lemma" : "bard",
"pos" : "NOUN",
"gender" : "m",
"senses" : [
{
"sense_id" : 1,
"description" : [
"cold, coldness, coolness, chilliness, freezing cold"
],
View unsafePerformIO vs monadicIO.run
> quickCheck (property True)
+++ OK, passed 100 tests.
> quickCheck (property False)
*** Failed! Falsifiable (after 1 test):
> quickCheck (unsafePerformIO $ return $ property True)
+++ OK, passed 100 tests.
> quickCheck (unsafePerformIO $ return $ property False)
*** Failed! Falsifiable (after 1 test):
@johnjcamilleri
johnjcamilleri / shell-log
Created Jun 27, 2014
Bug with --optimize-pgf
View shell-log
john@Biskuttina:~/repositories/REMU/projects/contract-logic/cnl$ ll
total 28056
drwxr-xr-x 23 john staff 782B Jun 27 14:04 ./
drwxr-xr-x 61 john staff 2.0K Jun 27 11:09 ../
-rw-r--r--@ 1 john staff 6.0K Apr 14 14:08 .DS_Store
-rw-r--r-- 1 john staff 80B May 5 13:06 CODiagFull.gf
-rw-r--r-- 1 john staff 145B Jun 27 14:03 CODiagFull.gfo
-rw-r--r-- 1 john staff 69B May 5 13:06 CODiagFullEng.gf
-rw-r--r-- 1 john staff 157B Jun 27 14:03 CODiagFullEng.gfo
-rw-r--r-- 1 john staff 226B May 5 13:29 CODiagFullEngParse.gf
You can’t perform that action at this time.