This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def new_entry(request): | |
format = "json" | |
if ('format' in request.POST): | |
format = request.POST['format'] | |
if ('submit' in request.POST): | |
# gives us a json: { "text" : "Dies ist eine Meldung", "isPublic" : 1 } | |
# entry_text = | |
# entry_isPublic = | |
# entry_published = datetime.now() | |
# -> save |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def manage(request): | |
if (request.action == 'new_entry'): | |
result = new_entry(request) | |
render(request.format,result) | |
if (request.action == 'new_pin'): | |
result = new_pin(request) | |
render(request.format,result) | |
def render(format,obj): | |
if (format == 'json'): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ So richtig ersichtlich ist es nicht für was das zu gebrauchen aber here we go… } | |
{ Diese Klasse speichert das OnChange Event eines TField-Objektes und | |
ersetzt das OnChange-Event mit einer eigenen Funktion. Die eigene | |
Funktion ruft das original OnChange-Event auf und das eigene | |
OnAlert-Event auf, so es denn vorhanden ist. } | |
unit uCCRefreshTitleFieldOnChange; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import sys | |
p = subprocess.check_output(['git','diff','--cached','--name-only']) | |
if (len(p) > 0): | |
p = p.split('\n') | |
if (len(p) > 1): | |
sys.stdout.write('Dateien:\n') | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Basic XMPP bot example for HipChat using node.js | |
// To use: | |
// 1. Set config variables | |
// 2. Run `node hipchat_bot.js` | |
// 3. Send a message like "!weather 94085" in the room with the bot | |
var request = require('request'); // github.com/mikeal/request | |
var sys = require('sys'); | |
var util = require('util'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_hook("buffer_loaded_hook", | |
function (buffer) { | |
if (! buffer instanceof content_buffer) | |
return; | |
if (/\/\/thread\.gmane\.org/.test(buffer.display_uri_string)) { | |
for (var frame in frame_iterator(buffer.top_frame)) { | |
frame = buffer.top_frame.frames[0]; | |
if (frame.name != 'threads') | |
continue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(autoload 'wl "wl" "Wanderlust" t) | |
(autoload 'wl-other-frame "wl" "Wanderlust on new frame." t) | |
(autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t) | |
(autoload 'wl-user-agent-compose "wl-draft" nil t) | |
(if (boundp 'mail-user-agent) | |
(setq mail-user-agent 'wl-user-agent)) | |
(if (fboundp 'define-mail-user-agent) | |
(define-mail-user-agent | |
'wl-user-agent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Actions { | |
public function doStuff() { | |
} | |
} | |
class Menu { | |
var items = array(); // contains MenuItems or Menu (SubMenus!) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fcntl.h> | |
#include <getopt.h> | |
#include <signal.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <sys/ioctl.h> | |
#include <sys/types.h> | |
#include <linux/kd.h> |
OlderNewer