Skip to content

Instantly share code, notes, and snippets.

Andrea Turso metaturso

  • Some Buffer
Block or report user

Report or block metaturso

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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))
@metaturso
metaturso / wisent-php-wy.el
Created Jun 21, 2015
Semantic parser for PHP 5.5+ from CEDET Contrib (Steven Remót's version). Uses `ede-php-autoload`.
View wisent-php-wy.el
;;; wisent-php-wy.el --- Generated parser support file
;; Copyright (C) 2008 Free Software Foundation
;; Author: Andrea Turso <trashofmasters@gmail.com>
;; Created: 2015-06-20 11:43:24+0100
;; Keywords: syntax
;; X-RCS: $Id$
;; This file is not part of GNU Emacs.
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\\": "" }
* },
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:344865
/**
* 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: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
You can’t perform that action at this time.