View other-window-or-prompt.el
;; (global-set-key [remap other-window] 'other-window-or-prompt) | |
(defun other-window-or-prompt (count &optional all-frames) | |
"Calls `other-window' as you'd expect from \\[C-x o] with the exception when | |
there is an active prompt. In this case the minibuffer | |
window will become active. If the prompt was active on a different frame than | |
the current one that frame will be gain focus." | |
(interactive "p") | |
(if (minibuffer-prompt) | |
(unwind-protect | |
(let* ((minibuf (active-minibuffer-window)) |
View Amkfile-alternative.php
<?php | |
/** | |
* Another example completely based on array, removing the need for | |
* the $amaka global variable | |
* | |
*/ | |
return [ | |
['task', 'Test'], | |
['task', ':build', ['Cli', 'Archiver', 'TokenReplacement'], function($t, $cli) { |
View gist:712758
var listen = function(last_modified, etag) { | |
console.log('Listening for new posts'); | |
var xhrArgs = { | |
url: '/banshee/activity?id=unified-wall', | |
handleAs: 'json', | |
headers: { | |
"If-None-Match": etag, | |
"If-Modified-Since": last_modified | |
}, | |
load: function(post, ioargs) { |
View gist:325476
#include <stdio.h> | |
#ifdef DEBUGGING | |
#define WHERESTR "[file %s, line %d]: " | |
#define WHEREARG __FILE__, __LINE__ | |
#define DEBUGPRINT2(...) fprintf(stderr, __VA_ARGS__) | |
#define DEBUGPRINT(_fmt, ...) DEBUGPRINT2(WHERESTR _fmt, WHEREARG, __VA_ARGS__) | |
#else | |
#define DEBUGPRINT(_tmt, ...) /** nothing */ | |
#endif |
View gist:323809
/** | |
* Esercitazione di Laboratorio: Tecniche e Linguaggi di Programmazione | |
* III Facoltà di Ingegneria: Ingegneria dell'Informazione | |
* Politecnico di Torino, a.a. 2009/2010 | |
* | |
* Copyright (C) 2009 Andrea Turso | |
* | |
* 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 |
View gist:254015
;; Configure appearance | |
(tooltip-mode -1) ; Remove tooltips | |
(menu-bar-mode -1) ; Remove menu bar | |
(tool-bar-mode -1) ; Remove toolbar | |
(scroll-bar-mode -1) ; Remove scroll bar | |
(setq inhibit-startup-message t) ; Remove startup message | |
(setq initial-scratch-message nil) ; Remove **scratch** message | |
(setq blink-cursor-mode nil) ; Stop that damned blinking cursor |
View ede-php-autoload-list-namespaces.php
<?php | |
/** | |
* Scans the Composer namespace mappings to obtain the correct | |
* paths of packages that use psr-0 with target-dir. | |
* | |
* @see https://getcomposer.org/doc/04-schema.md#target-dir | |
* { | |
* "autoload": { | |
* "psr-0": { "Symfony\\Component\\Finder\\": "" } | |
* }, |