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
(defun LaTeX-transpose-table (start end) | |
(interactive "r") | |
(goto-char start) | |
(let ((last start) | |
(rows (list ())) | |
(nrows 0) | |
(ncols 0) | |
(maxcols 0)) | |
(while (re-search-forward "&\\|\\\\\\\\" end t) | |
(setf (car rows) |
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
(defun wrap-region-in (start-text end-text) | |
"Insert START-TEXT at the beginning of the currently active | |
region, and END-TEXT at the end of it." | |
(let ((start (min (point) (mark))) | |
(end (max (point) (mark)))) | |
(save-excursion | |
(goto-char end) | |
(insert end-text) | |
(goto-char start) | |
(insert start-text)))) |
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
#! /usr/bin/python | |
import yaml | |
class Persistable(object): | |
# simulate a unique id | |
_unique = 0 | |
def __init__(self, *args, **kw): | |
Persistable._unique += 1 |
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
/** | |
* @file concurrent_bitset.hpp | |
* | |
* Implementation of a concurrent @c std::bitset using Intel TBB. | |
* | |
* @author riccardo.murri@gmail.com | |
* @version $Revision$ | |
*/ | |
/* | |
* Copyright (c) 2011 Riccardo Murri <riccardo.murri@gmail.com>. All rights reserved. |
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
\documentclass[final,english,serif]{beamer} | |
\usetheme{gc3} | |
\usepackage[T1]{fontenc} | |
\usepackage[utf8]{inputenc} | |
\usepackage[english]{babel} | |
\usepackage{graphicx} | |
\usepackage{gc3} |
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
[1mDEBUG -- translate:361:translate[0m | |
; ModuleID = 'tmp.module.fatghol.simplematrix.__new__.25311b8' | |
@PyArray_API = linkonce_odr global i8** inttoptr (i64 46912560938432 to i8**) | |
define { i64, i8* }* @__numba_specialized_0_fatghol_2E_simplematrix_2E___new__({ i64, i8* }* %cls, i32 %rows, i32 %columns) { | |
entry: | |
%objtemp3 = alloca { i64, i8* }* | |
store { i64, i8* }* null, { i64, i8* }** %objtemp3, !tbaa !2 |
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
(defun check-cfengine-block-length (filename) | |
(save-excursion | |
(find-file filename) | |
(goto-char (point-min)) | |
(while (re-search-forward "\\[%CFEngine +BEGIN *%\\]" nil 'noerror) | |
(let ((start (match-end 0)) | |
(start-line (what-line))) | |
(if (re-search-forward "\\[%CFEngine +END *%\\]" nil 'noerror) | |
(let ((end (match-beginning 0)) | |
(end-line (what-line))) |
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
# Sample CFEngine usage of the `ips` module. | |
# | |
# You should get something like the following: | |
# | |
# $ cf-agent -I -f ./TEST.cf -K | |
# 2014-01-31T16:43:01+0100 info: Executing 'no timeout' ... 'ips' | |
# 2014-01-31T16:43:01+0100 info: Completed execution of 'ips' | |
# 2014-01-31T16:43:01+0100 notice: R: Running a test | |
# 2014-01-31T16:43:01+0100 notice: R: Interface `lo` NOT detected, as it's not UP | |
# 2014-01-31T16:43:01+0100 notice: R: Interface `wlan0` detected UP |
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
Example processing using the `j2pp` preprocessor; | |
see: http://github.com/uzh/j2pp | |
Domain name: {{sys.domain}} | |
L2 addresses (list): | |
{% for hwaddr in sys.hardware_addresses -%} | |
* {{ hwaddr }} | |
{% endfor %} |
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
#! /usr/bin/env python | |
import re | |
from markdown2 import markdown | |
link_patterns = [ | |
# issueNNN --> /help/issueNNN | |
(re.compile(r'\b(issue)\s*(\d+)\b'), r'/help/\g<1>\g<2>'), |
OlderNewer