Skip to content

Instantly share code, notes, and snippets.

View zzeroo's full-sized avatar
💤
zzeroo...

zzeroo zzeroo

💤
zzeroo...
View GitHub Profile
@zzeroo
zzeroo / markdown.vim
Created October 15, 2012 05:55 — forked from natesilva/markdown.vim
Vim: Preview a Markdown document in the default browser on Windows or Mac OS X
"
" While editing a Markdown document in Vim, preview it in the
" default browser.
"
" Author: Nate Silva
"
" To install: Place markdown.vim in ~/.vim/ftplugin or
" %USERPROFILE%\vimfiles\ftplugin.
"
" To use: While editing a Markdown file, press ',p' (comma p)
@zzeroo
zzeroo / Makefails.sh
Last active September 17, 2015 13:57
CDPATH="${ZSH_VERSION+.}:" && cd . && /usr/bin/valac --vapidir ../ --pkg libmodbus --pkg posix -g -C unit-test-server.vala
unit-test-server.vala:224.37-224.41: error: Incompatible operand
Posix.send(w_s, (void*)(req+i), 1, MSG_NOSIGNAL);
^^^^^
CDPATH="${ZSH_VERSION+.}:" && cd . && /usr/bin/valac --vapidir ../ --pkg libmodbus --pkg posix -g -C unit-test-server.vala
unit-test-server.vala:224.29-224.42: error: Pointer arithmetic not supported for `void*'
Posix.send(w_s, (void*)(req)+i, 1, MSG_NOSIGNAL);
^^^^^^^^^^^^^^
private const uint32 UNSIGNED32 = 0x9a226544;
void main () {
}
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//edv-und-netzwerktechnik.de/piwik/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 1]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://piwik.gaswarnanlagen.com/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 1]);
bareos-sd (90): stored_conf.c:845-0 Inserting Director res: linux01-mon
bareos-sd (90): stored_conf.c:845-0 Inserting Device res: usb-vchanger-1-drive-0
bareos-sd (90): stored_conf.c:845-0 Inserting Device res: usb-vchanger-1-drive-1
bareos-sd (250): message.c:349-0 Copy message resource 779658 to 79c468
linux01-sd (100): jcr.c:141-0 read_last_jobs seek to 192
linux01-sd (100): jcr.c:148-0 Read num_items=4
linux01-sd (8): crypto_cache.c:55-0 Could not open crypto cache file. /var/lib/bareos/bareos-sd.9103.cryptoc ERR=Datei oder Verzeichnis nicht gefunden
linux01-sd (250): sd_plugins.c:322-0 Load sd plugins
linux01-sd (250): sd_plugins.c:324-0 No sd plugin dir!
linux01-sd (10): socket_server.c:112-0 stored: listening on port 9103
@zzeroo
zzeroo / bareos-sd
Created January 4, 2016 10:55
bareos-sd -u bareos -g bareos -d 300 # startet by hand
bareos-sd (90): stored_conf.c:845-0 Inserting Director res: linux01-mon
bareos-sd (90): stored_conf.c:845-0 Inserting Device res: usb-vchanger-1-drive-0
bareos-sd (90): stored_conf.c:845-0 Inserting Device res: usb-vchanger-1-drive-1
bareos-sd (250): message.c:349-0 Copy message resource 779658 to 79c468
linux01-sd (100): jcr.c:141-0 read_last_jobs seek to 192
linux01-sd (100): jcr.c:148-0 Read num_items=4
linux01-sd (8): crypto_cache.c:55-0 Could not open crypto cache file. /var/lib/bareos/bareos-sd.9103.cryptoc ERR=Datei oder Verzeichnis nicht gefunden
linux01-sd (250): sd_plugins.c:322-0 Load sd plugins
linux01-sd (250): sd_plugins.c:324-0 No sd plugin dir!
linux01-sd (10): socket_server.c:112-0 stored: listening on port 9103
{{velocity}}
{{documentTree root="document:$doc" /}}
{{/velocity}}
@zzeroo
zzeroo / playground.rs
Created March 17, 2016 07:30 — forked from anonymous/playground.rs
Shared via Rust Playground
use std::collections::HashMap;
fn create_hashmap(strand_a: &str, strand_b: &str) -> HashMap<char, char> {
let strand_a: Vec<_> = strand_a.chars().collect();
let strand_b: Vec<_> = strand_b.chars().collect();
strand_a.iter().zip(strand_b.iter()).map(|(&a, &b)| (a, b)).collect()
}
fn main() {
@zzeroo
zzeroo / playground.rs
Created March 21, 2016 19:28 — forked from anonymous/playground.rs
Shared via Rust Playground
use std::collections::HashMap;
fn nucleotide_counts(nucleotides: &str) -> HashMap<char, usize> {
let mut nucleotide = HashMap::new();
for n in nucleotides.chars() {
let counter = nucleotide.entry(n) // gets the given key's corrosponding entry in the map for in-place manipulation
.or_insert(0); // ..or insert 0 if its not present already
*counter += 1; // Now increment the entry, so it's 1 for all new keys or plus one for all other.
}
nucleotide