Skip to content

Instantly share code, notes, and snippets.

View brvier's full-sized avatar

Benoît HERVIER brvier

View GitHub Profile
@brvier
brvier / NotesModel.cpp
Last active January 14, 2018 08:35
NotesModel.cpp wrong use of libgit2
#include "notesmodel.h"
#include "QDir"
#include "QDateTime"
#include "QStandardPaths"
#include "QTextStream"
#include "QDebug"
#include "QSettings"
#include "git2.h"
Note::Note(const QString &path)
@brvier
brvier / NotesModel.cpp
Created October 30, 2014 17:07
NotesModel.cpp MERGE_HEAD file still present after merge commit
#include "notesmodel.h"
#include "QDir"
#include "QDateTime"
#include "QStandardPaths"
#include "QTextStream"
#include "QDebug"
#include "QSettings"
#include "git2.h"
void e(int error) {
int NotesModel::pull() {
/*
git_repository *repo = NULL;
git_strarray remotes = {0};
git_remote *remote = NULL;
git_index *idx = NULL;
git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
git_clone_options clone_opts = GIT_CLONE_OPTIONS_INIT;*/
@brvier
brvier / fuzzylock.sh
Created January 12, 2016 16:28
i3 filesaver script used with xautolock and bluetooth proximity
#!/bin/sh -e
DEVICE=E4:F8:EF:1F:D1:F4
DEV_NAME="K"
opt=`hcitool name $DEVICE`
if [ "$opt" = "$DEV_NAME" ]; then
echo "Device '$opt' found"
else
echo "Can't find device $DEVICE ($DEV_NAME); locking!"
Verifying that +khertan is my blockchain ID. https://onename.com/khertan
@brvier
brvier / autocommit.py
Created January 24, 2017 05:47
Autocommit git with dulwich
from dulwich import porcelain
import os
import os.path
import sys
import io
class GitRepository:
def __init__(self, localpath=os.path.expanduser('~/Notes'), remote=None):
@brvier
brvier / gist:1b0a875613c60f656084bef93662bd70
Created January 24, 2017 15:32
Kivy Experimental not working unfinished radargraph
from math import cos, sin, pi
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.graphics import Color, Ellipse, Line, Mesh
from kivy.properties import ListProperty
from kivy.clock import Clock
import itertools
import random

Keybase proof

I hereby claim:

  • I am khertan on github.
  • I am khertan (https://keybase.io/khertan) on keybase.
  • I have a public key ASB07wfiLSUyRIra57uKo4wBE1uS1IUCrH8dMrJT2a4mAgo

To claim this, I am signing this object:

@brvier
brvier / keybase.md
Created May 23, 2018 14:03
keybase.md

Keybase proof

I hereby claim:

  • I am brvier on github.
  • I am brvier (https://keybase.io/brvier) on keybase.
  • I have a public key whose fingerprint is D206 70E6 F103 6B4C 08AA 44F8 85BE 2E5C FFDC 5BB5

To claim this, I am signing this object:

@brvier
brvier / datepicker.py
Last active December 17, 2021 13:28 — forked from el3/datepicker.py
datepicker for kivy
"""
Datetime Picker
=====
A simple datetime picker for BrOrg
fork of https://gist.github.com/el3/4db1060a4328ae8bbcd9a0fe07826a2b (github.com/el3)
"""
__version__ = "0.1.0"