Skip to content

Instantly share code, notes, and snippets.

Michael Longval mlongval

Block or report user

Report or block mlongval

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mlongval / gist:78206e9c48c2eb123e1af09e807c3ac1
Created Feb 26, 2019
Ultisnips (Vim) snippet to set a vim modeline and set buffer language
View gist:78206e9c48c2eb123e1af09e807c3ac1
# set the document modeline and spelling to english
snippet setenglish "" b
# vim: spell spelllang=en
`!p vim.command("set spelllang=en")`
# set the document modeline and spelling to french
snippet setfrench "" b
# vim: spell spelllang=fr
`!p vim.command("set spelllang=fr")`
View gist:9fbe1e16b97be6e16ce0675b7291da94
def overlap():
import random
listA = random.sample(range(100), k=10)
listB = random.sample(range(100), k=12)
listC = list(set([x for x in listA if x in listB]))
return listC
mlongval / ToggleGrayScaleMode
Last active Feb 3, 2016
MacOSX Grayscale Mode Toggle Applescript
View ToggleGrayScaleMode
ToggleGrayScaleMode for MacOSX 10.9 Mavericks
works as of 15 april 2014
This is an AppleScript UI script to toggle GrayScaleMode in System Preferences.
I am red-green colorblind and grayscale helps a lot...
Works for me. Hope it can be usefull for you.
mlongval / Python3 and Matplotlib
Created Feb 14, 2013
Getting matplotlib to work with Python3 on Xubuntu 12.04
View Python3 and Matplotlib
Getting matplotlib running with python3
Here are the steps that I went through to get Matplotlib to work.
(as far as I know so far.....)
I am using a Xubuntu 12.04 (Ubuntu) system.
(Your mileage may vary....)
mlongval /
Last active Dec 13, 2015
AutoKey code snippet to insert the current date. The original version did not work, I think because I am using Python3
This is for use in the AutoKey text expander under Linux
The version of this script that came with the program does not work
on my system...
I think it's because I use python3
Returns the current date. in the dd/mm/yyyy format
You can’t perform that action at this time.