Skip to content

Instantly share code, notes, and snippets.

View aeris's full-sized avatar

aeris aeris

View GitHub Profile
@aeris
aeris / ir_black.colorsheme
Created August 9, 2012 20:37
IR Black for Konsole
[Background]
Color=0,0,0
Transparency=false
[BackgroundIntense]
Bold=true
Color=44,44,44
Transparency=false
[Color0]
@aeris
aeris / clip.py
Created August 9, 2012 23:21
Copy/paste from command line with Klipper
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
import argparse, dbus, sys
bus = dbus.SessionBus()
klipper = bus.get_object('org.kde.klipper', '/klipper')
@aeris
aeris / mvn-activate.sh
Created September 2, 2012 19:48
Maven settings activator
#!/bin/bash
PROFILE=$1
MVN_HOME=~/.m2
SETTINGS_FILE=settings.xml
SETTINGS="${MVN_HOME}/${SETTINGS_FILE}"
if [ -z "$1" ]; then
rm -f "${SETTINGS}"
else
@aeris
aeris / build-rpi-sd-card.sh
Created October 1, 2012 20:03
Build custom Raspberry Pi Debian
#!/bin/bash
# apt-get install binfmt-support qemu qemu-user-static debootstrap kpartx lvm2 dosfstools
deb_mirror="http://ftp.fr.debian.org/debian"
#deb_local_mirror="http://debian.kmp.or.at:3142/debian"
bootsize="64M"
deb_release="wheezy"
device=$1
@aeris
aeris / main.qml
Created October 28, 2012 11:15
Widget problem size
import Qt 4.7
import org.kde.plasma.core 0.1 as PlasmaCore
import org.kde.plasma.graphicswidgets 0.1 as PlasmaWidgets
Item {
id: pomodoro
PlasmaWidgets.PushButton {
id: button
anchors {
@aeris
aeris / cryptroot-prepare.sh
Last active October 13, 2015 19:38
Cryptfs multiple device with one passphrase
#!/bin/sh
# Auto-LUKS : Automatically open multiple LUKS containers with a single passphrase
# Aeris <aeris@imirhil.fr>
# Licensed under AGPLv3 or later
PREREQ=""
prereqs() {
echo "$PREREQ"
}
public String foreignKeyColumnName(final String propertyName,
final String propertyEntityName, final String propertyTableName,
final String referencedColumnName) {
return this.columnName(propertyTableName) + "_"
+ this.columnName(referencedColumnName);
}
@aeris
aeris / DateTimeRange.java
Created December 18, 2012 09:35
Java refactoring
public class DateTimeRange {
private final DateTime start;
private final DateTime end;
public DateTimeRange(final DateTime start, final DateTime end) {
this.start = start;
this.end = end;
}
public DateTime getStart() {
@aeris
aeris / xd.rb
Created December 31, 2012 14:24
Fast cd with learning
#!/usr/bin/env ruby
#encoding: utf-8
require 'sqlite3'
SEPARATOR = ''
class Stats
DB_FILE=File.join Dir.home, ".xd.sqlite3"
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface DbSchema {
String value();
}