Skip to content

Instantly share code, notes, and snippets.

@jeromenerf
jeromenerf / make-capture-frame.el
Created February 21, 2018 08:16
make-capture-frame
(defadvice org-capture-finalize
(after delete-capture-frame activate)
"Advise capture-finalize to close the frame"
(if (equal "capture" (frame-parameter nil 'name))
(delete-frame)))
(defadvice org-capture-destroy
(after delete-capture-frame activate)
"Advise capture-destroy to close the frame"
(if (equal "capture" (frame-parameter nil 'name))
import $ from "jquery";
import React, { Component } from "react";
import { render } from "react-dom";
import Form from "react-jsonschema-form";
import * as schemas from "./schemas";
import DatePicker from "react-datepicker";
import moment from "moment";
import "moment/locale/fr";
export class AvisForm extends React.Component {
@jeromenerf
jeromenerf / context.md
Created November 26, 2017 10:42
Grub issues on a Macbook running Debian stable and Mac OS High Sierra

Setup

The machine contains one SSD drive which is partitionned as following:

  • EFI partition, vfat
  • macos partition, apfs (recently converted from something else, pre high sierra)
  • linux swap
  • linux root, ext4

Boot setup

vcl 4.0;
import std;
backend default {
.host = "127.0.0.1";
.port = "1313";
}
backend front_api {
@jeromenerf
jeromenerf / useless.diff
Last active November 8, 2017 15:25
uselessgaps
diff --git a/Spectacle/SpectacleConstants.h b/Spectacle/SpectacleConstants.h
index 7ffec1d..b605b83 100644
--- a/Spectacle/SpectacleConstants.h
+++ b/Spectacle/SpectacleConstants.h
@@ -59,7 +59,7 @@ extern const NSInteger SpectacleEscapeKey;
#pragma mark -
extern const CGFloat SpectacleWindowSizeOffset;
-
+extern const CGFloat SpectacleUselessGap;
@jeromenerf
jeromenerf / uselessgaps.patch
Created November 12, 2014 17:42
POC for useless gaps in Spectacle App
diff --git a/Spectacle/SpectacleConstants.h b/Spectacle/SpectacleConstants.h
index 7ffec1d..b605b83 100644
--- a/Spectacle/SpectacleConstants.h
+++ b/Spectacle/SpectacleConstants.h
@@ -59,7 +59,7 @@ extern const NSInteger SpectacleEscapeKey;
#pragma mark -
extern const CGFloat SpectacleWindowSizeOffset;
-
+extern const CGFloat SpectacleUselessGap;
package main
import (
"fmt"
"log"
"net/http"
"path/filepath"
"strings"
"./locations"
@jeromenerf
jeromenerf / locations.json
Created April 23, 2014 11:41
POI coordinates
locations = {
"orlyouest" = {
"name": "Orly Ouest",
"domain": "orlyouest.prod.adp.af83.com",
"coordinates": {
"google": "Orly-Ouest",
"latlong": [48.729719, 2.36014],
"xy": [601714.0, 2414425.0]
},
},
@jeromenerf
jeromenerf / gist:5679866
Last active December 17, 2015 22:09
Back and forth Google WGS84 and STIF Lambert 2 Étendu, via Lambert 93
package main
import (
"fmt"
proj "github.com/pebbe/go-proj-4/proj"
"math"
)
type Poi struct {
name string