Skip to content

Instantly share code, notes, and snippets.

@luniki
luniki / 01-vorher.php
Last active December 20, 2015 19:28
Stud.IP: Vergleich eines Fake-Logins für 2.3 und später
<?
protected function start_session($user_id)
{
global $perm, $user, $auth, $sess, $forced_language, $_language;
$user = new Seminar_User();
$user->start($user_id);
@luniki
luniki / drop.sh
Created August 2, 2013 09:58
Drop all tables
MYSQL="mysql -h HOST -u USERNAME -pPASSWORD -D DB_NAME"
$MYSQL -BNe "show tables" | awk '{print "set foreign_key_checks=0; drop table `" $1 "`;"}' | $MYSQL
unset MYSQL
@luniki
luniki / halt.php
Last active December 19, 2015 23:59
#halt
<?
function words($string)
{
return preg_split('/ /', $string, -1, PREG_SPLIT_NO_EMPTY);
}
function halt(/* [status], [headers], [body] */)
{
$args = func_get_args();
@luniki
luniki / gist:6006552
Last active December 19, 2015 19:29
RouterMap.php-Methoden
<?
class RouteMap {
// [...]
// TODO (mlunzena): Implement these
// Set the Content-Type of the response body given a media type or
// file extension.
@luniki
luniki / StudipDispatcher.php
Created June 25, 2013 08:18
StudipDispatcher
<?php
/**
* StudipDispatcher.php - create the default Trails dispatcher
*
* 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 2 of
* the License, or (at your option) any later version.
*
// Generated by CoffeeScript 1.5.0
(function() {
var $, dialog, dialog_template, getCid, getWikiPages, intermap, openLinkDialog, url;
$ = jQuery;
dialog_template = _.template("<div title='Stud.IP-Link einf&uuml;gen'>\n <select>\n <% _.each(keywords, function(keyword) { %>\n <option><%= keyword %></option> <% }); %>\n </select>\n <button class=submit>Einf&uuml;gen</button>\n</div>");
url = function(cid) {
return STUDIP.ABSOLUTE_URI_STUDIP + ("plugins.php/restipplugin/api/courses/" + cid + "/wiki");
<?php
/**
*
**/
class UserRoute implements APIRoute
{
/**
*
**/

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for Google TV

Consumer key: iAtYJ4HpUVfIUoNnif1DA

commit 313024da9c20df01ef6ac71741a42c53e993b5c4
Author: Marcus Lunzenauer <mlunzena@uos.de>
Date: Fri Nov 2 08:51:35 2012 +0100
prevent user faking to compatible-ize with Stud.IP2.3
Modified app/controllers/api.php
diff --git a/app/controllers/api.php b/app/controllers/api.php
index 9cb0298..7d7b1e8 100644
--- a/app/controllers/api.php
@luniki
luniki / reenhance.coffee
Created October 25, 2012 11:59
backbone re-enhance page
if @el.parentNode
parent = @$el.parent()
@$el.remove().appendTo(parent).page()
parent.append(@$el)
@$el.page()