Skip to content

Instantly share code, notes, and snippets.

View aflp91's full-sized avatar

Antoine Pérus aflp91

  • Cnrs/In2p3/IJCLab
  • France
View GitHub Profile
@aflp91
aflp91 / slidy.template
Created August 24, 2011 15:52
Slidy2 template for pandoc
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
$for(author)$
<meta name="author" content="$author$" />
$endfor$
@aflp91
aflp91 / gist:3758616
Created September 20, 2012 22:02
TextMate 2 .tm_properties

This is all based on the [alpha release][1].

Properties

From the built-in help system:

For many settings TextMate will look for a .tm_properties file in the current folder and in any parent folders (up to the user’s home folder).

These are simple setting = value listings where the value is a format string in which other variables can be referenced.

from kivy.config import Config
Config.set('graphics', 'width', '320')
Config.set('graphics', 'height', '480')
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.widget import Widget
from kivy.uix.settings import SettingsWithNoMenu
import json
@aflp91
aflp91 / README.rst
Created May 22, 2016 21:19 — forked from dupuy/README.rst
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

@aflp91
aflp91 / screen-docker-for-mac.sh
Created March 25, 2017 20:58 — forked from BretFisher/docker-for-mac.md
Screen Commands for Docker for Mac (prevent garbled text on reconnect)
# connect to tty on Docker for Mac VM
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
# disconnect that session but leave it open in background
Ctrl-a d
# list that session that's still running in background
screen -ls
# reconnect to that session (don't open a new one, that won't work and 2nd tty will give you garbled screen)
@aflp91
aflp91 / filter-flow-hotfix-start-version
Created March 27, 2017 20:16 — forked from petervanderdoes/filter-flow-hotfix-start-version
gitflow hooks and filter for gitflow development
#!/bin/sh
#
# Runs during git flow release start
#
# Positional arguments:
# $1 Version
#
# Return VERSION - When VERSION is returned empty gitflow
# will stop as the version is necessary
#
@aflp91
aflp91 / gist:7bf0a1c2af20cd3a2f6a69bab9b65622
Created May 8, 2017 15:51
Installation de Kivy 1.10.0 OSX
`--> mkdir ~/Documents/Projets/Kivy
`--> cd ~/Documents/Projets/Kivy
`--> virtualenv -p /usr/local/bin/python3 venv
Running virtualenv with interpreter /usr/local/bin/python3
Using base prefix '/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/aperus/Documents/Projets/Kivy/venv/bin/python3.6
Also creating executable in /Users/aperus/Documents/Projets/Kivy/venv/bin/python
Installing setuptools, pip, wheel...done.
@aflp91
aflp91 / github-wiki-how-to.md
Created April 11, 2018 14:57 — forked from subfuzion/github-wiki-how-to.md
GitHub Wiki How-To

How do I clone a GitHub wiki?

Any GitHub wiki can be cloned by appending wiki.git to the repo url, so the clone url for the repo https://myorg/myrepo/ is: [email protected]/myorg/myrepo.wiki.git (for ssh) or https://github.com/my/myrepo.wiki.git (for https).

You make edits, and commit and push your changes, like any normal repo.

How do I add images to a wiki page?

You need to clone the wiki repo and edit it on your system.

@aflp91
aflp91 / jpg2pdf.make
Created April 30, 2018 07:49
A Makefile to convert jpg to pdf and then concatenate (on MacOSX)
JPG = $(wildcard Orig/*.JPG)
PDF = $(patsubst Orig/%.JPG,%.pdf,$(JPG))
CONCAT = "/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py"
.PHONY: help clean all convert concat
.DEFAULT :
@$(MAKE) help
@aflp91
aflp91 / main.py
Created March 25, 2019 15:59 — forked from shaun-russell/main.py
Click Python command line program template
''' Tool for FUNCTION and FUNCTION. '''
# Better description of thing.
import os
import click
# used to tell Click that -h is shorthand for help
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])