Skip to content

Instantly share code, notes, and snippets.

View Lorac's full-sized avatar

Maxime Roussin-Bélanger Lorac

View GitHub Profile
@Lorac
Lorac / main.go
Created February 21, 2018 13:23
Ratelimit gitlab
package main
import (
"fmt"
"sync"
gitlab "github.com/xanzy/go-gitlab"
)
func main() {
@Lorac
Lorac / mapping.imp
Last active June 18, 2018 15:24
Qt 5.9 include what you use mapping
# Qt
# Incomplete
{ include: ["<../../../qtdeclarative/src/qml/jsapi/qjsengine.h>", private, "<QJSEngine>", public ] },
{ include: ["<../../../qtdeclarative/src/qml/jsapi/qjsvalue.h>", private, "<QJSValue>", public ] },
{ include: ["<../../../qtdeclarative/src/qml/qml/qqmlcontext.h>", private, "<QQmlContext>", public ] },
{ include: ["<../../../qtdeclarative/src/qml/qml/qqmlengine.h>", private, "<QQmlEngine>", public ] },
{ include: ["<../../../qtdeclarative/src/quick/items/qquickitem.h>", private, "<QQuickItem>", public ] },
{ include: ["<../../../qtdeclarative/src/quick/items/qquickview.h>", private, "<QQuickView>", public ] },
{ include: ["<../../../qtdeclarative/src/quick/items/qquickwindow.h>", private, "<QQuickWindow>", public ] },
{ include: ["<../../../qtdeclarative/src/qml/qml/qqmlapplicationengine.h>", private, "<QQmlApplicationEngine>", public ] },
@Lorac
Lorac / createmr
Last active January 12, 2018 21:43
Create merge request on Gitlab
#!/usr/bin/env python3
import os
import argparse
import tempfile
import getpass
import keyring
from pathlib import Path
from subprocess import call
@Lorac
Lorac / PlaylistGenerator.py
Last active March 16, 2017 17:35
Based of an artist, generate a playlist
#!/usr/bin/python3
import argparse
import itertools
import sys
import time
import threading
import spotipy
import spotipy.util as util
@Lorac
Lorac / server.js
Created April 1, 2016 03:41
Simplified version of socket chat
var express = require('express');
var app = express();
var server = require('http').Server(app);
var io = require('socket.io')(server);
var port = process.env.PORT || 8120;
server.listen(port, function () {
console.log('Chat is listening on port %d', port);
});