Skip to content

Instantly share code, notes, and snippets.

@Mic92
Mic92 / Report.java
Created October 21, 2012 07:54
Resourcen
package org.apprenticemobile.api;
import java.util.Date;
/**
*
*/
public class Report {
public int id;
public int userId;
@Mic92
Mic92 / nginx.conf
Last active May 26, 2019 14:46
nginx configuration for the selfoss rss readerAs I don't get notification for gist comments, please add your modification to the wiki:https://github.com/SSilence/selfoss/wiki/nginx-configuration
# please make sure all directories/files in public/ are readable to your webserver, as well as data/favicons
# If it still doesn't work look into your log files at /var/log/nginx/rss.error.log
upstream backend { server unix:/var/run/php-fpm.sock; }
server {
listen [::]:80;
listen [::]:443 ssl;
server_name rss.yourdomain.com;
root /var/www/selfoss/;
@Mic92
Mic92 / SoloCompat.java
Last active December 10, 2015 16:48
Portable solution to click on a MenuItem in ActivityInstrumentationTestCase2 for ActionbarSherlock
package com.your.package;
import android.app.Activity;
import android.app.Instrumentation;
import com.jayway.android.robotium.solo.Solo;
/**
* Extension of Solo to click Menu Items, when using ActionBarSherlock
* Provides Compatibility across all android versions
@Mic92
Mic92 / PKGBUILD
Created January 17, 2013 12:37
PKGBUILD for tpacpi-bat
# Maintainer: mutlu_inek <mutlu_inek@yahoo.de>
pkgname=tpacpi-bat
pkgver=20111102
pkgrel=1
pkgdesc="A Perl script with ACPI calls for recent ThinkPads (such as T420 and W520) whose battery thresholds are not supported by tp_smapi"
url="https://github.com/teleshoes/tpacpi-bat"
arch=('x86_64' 'i686')
license=('GPLv3')
depends=('tp_smapi' 'perl' 'acpi_call-git')
optdepends=()
@Mic92
Mic92 / PKGBUILD
Created January 31, 2013 13:10
PKGBUILD for git-pull-request
# Maintainer: Jörg Thalheim <joerg@higgsboson.tk>
pkgname=git-pull-request
pkgver=20130131
pkgrel=1
pkgdesc="git command to automatically pull github pull requests locally"
arch=('any')
url="http://www.splitbrain.org/blog/2011-06/19-automate_github_pull_requests"
license=('MIT')
depends=('python' 'git')
@Mic92
Mic92 / PKGBUILD
Created January 31, 2013 13:12
PKGBUILD for git-pull-request
# Maintainer: Jörg Thalheim <joerg@higgsboson.tk>
pkgname=git-pull-request
pkgver=20130131
pkgrel=1
pkgdesc="git command to automatically pull github pull requests locally"
arch=('any')
url="http://www.splitbrain.org/blog/2011-06/19-automate_github_pull_requests"
license=('MIT')
depends=('python' 'git')
@Mic92
Mic92 / encrypted.coffee
Last active December 12, 2015 09:19
Nodejs sucks a little.
fs = require('fs')
crypto = require('crypto')
plainURL = "./plain.txt"
cryptedURL = "./encrypted.bin"
plainURL2 = "./plain2.txt"
key = "mysupersecret"
algo = 'aes-256-cbc'
plain = fs.readFileSync plainURL, 'binary'
cipher = crypto.createCipher(algo, key.toString('binary'))
From 4437f3f80c3d168b626cd9ae1666aaef0ff378b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@higgsboson.tk>
Date: Mon, 18 Feb 2013 22:57:39 +0100
Subject: [PATCH] command: allow to omit END in ranges (START:END)
If END is omitted, mpd should use the highest possible value instead of raising an error.
This partially reverts 52e9cab1c1743f64a7
---
src/protocol/ArgParser.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@Mic92
Mic92 / uploaddropbox.py
Created March 4, 2013 08:21
dropbox upload for pyload
#!/usr/bin/env python2
import sys
import inspect
import os.path
import subprocess
import logging
from dropbox import client, rest, session
# XXX Fill in your consumer key and secret below
# You can find these at http://www.dropbox.com/developers/apps
# rbenv setup
export RBENV_ROOT=/usr/local/rbenv
export PATH="$RBENV_ROOT/bin:$PATH"
eval "$(rbenv init -)"