This file contains hidden or 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
function! s:Extract(remove) range | |
if a:remove == '!' | |
let cmd = 'd' | |
else | |
let cmd = 'y' | |
endif | |
exe ':' . a:firstline . ',' . a:lastline . cmd | |
new |
This file contains hidden or 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
function _service_services { | |
systemctl list-unit-files --no-legend --no-pager --full | \ | |
awk '/\.service/&&!/@|systemd/{ | |
gsub(".service", ""); | |
print $1; | |
}' | |
} | |
function _service_completion { | |
if (( CURRENT == 3 )) |
This file contains hidden or 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
CREATE TABLE `posts` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`network` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, | |
`net_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, | |
`message` text COLLATE utf8_unicode_ci, | |
`link` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, | |
`thumbnail` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, | |
`visible` tinyint(1) DEFAULT '1', | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, |
This file contains hidden or 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
let s:line_cont = '\\\s*$' | |
" | |
" lines are something like: | |
" [ | |
" "/* #!ruby \\", | |
" " * -w" | |
" " *", | |
" " * puts 'Hello, world'" | |
" "*/" |
This file contains hidden or 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 <stdio.h> | |
// the main purpose of the plugin is | |
// to take a range of lines, strip out comments, | |
// execute given command with given stdin input | |
// and put its output after selected area. | |
// For example: | |
/* | |
* ruby |
This file contains hidden or 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
// ------- Preamble -------- // | |
#include <avr/io.h> | |
#include <util/delay.h> | |
struct { | |
int delay; | |
uint8_t len; | |
uint8_t *pattern; | |
} patterns[] = { | |
{ |
This file contains hidden or 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
//= require uikit | |
//= require_self | |
@import "../fonts/stylesheet.css"; | |
html, body { | |
margin: 0; | |
padding: 0; | |
min-height: 100%; | |
} |
This file contains hidden or 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
$ -> | |
init_map = (self) -> | |
[lat, lng, zoom] = [self.attr('data-lat'), self.attr('data-lng'), self.attr('data-zoom')] | |
pos = new google.maps.LatLng(lat, lng) | |
map = new google.maps.Map self[0], | |
center: pos | |
zoom: parseInt(zoom) or 7 | |
mapTypeId: google.maps.MapTypeId.ROADMAP |
This file contains hidden or 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 json | |
import os | |
import sys | |
class BookLoadingError(RuntimeError): | |
pass | |
class Book: | |
LOADERS = ['load_doka', 'load_devdocs', 'load_devhelp'] |