Skip to content

Instantly share code, notes, and snippets.

View leonardinius's full-sized avatar

Leonids Maslovs leonardinius

View GitHub Profile
@leonardinius
leonardinius / master.yaml
Created February 25, 2014 12:26
/etc/salt/master
fileserver_backend:
- git
- roots
gitfs_provider: gitpython
gitfs_remotes:
- git+ssh://git@github.com/xxx/provisioning.git
gitfs_root: provisioning/gitfs_root
timesheet:
service.runing:
- enable: True
- full_restart: True
- watch:
- pkg: dependency-packages
- file: /etc/init.d/timesheet
- cmd: set_start_exe
/etc/salt/cloud.profiles:
elasticsearch_high:
provider: ec2
script: /etc/salt/cloud.deploy.d/user_data.sh
network_interfaces:
- DeviceIndex: 0
PrivateIpAddresses:
- Primary: True
AssociatePublicIpAddress: False

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
mkdir -p .deps/build/third-party
cd .deps/build/third-party && \
cmake -G 'Unix Makefiles' \
../../../third-party
Re-run cmake no build system arguments
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<style type="text/css">
@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);
@leonardinius
leonardinius / nvim_gdb.vim
Created June 22, 2015 22:53
Rust GDB NVim frontend
sign define GdbBreakpoint text=●
sign define GdbCurrentLine text=⇒
let s:gdb_port = 7778
let s:run_gdb = "rust-gdb -q -f `find target/debug/ -type f -executable`"
let s:breakpoints = {}
let s:max_breakpoint_sign_id = 0
@leonardinius
leonardinius / log.txt
Last active August 29, 2015 14:23
snippet
DEBUG:git_wayback_machine::history: make_entry: "921ebcd|Leonids Maslovs|7 days ago|Initial commit" -> ["921ebcd", "Leonids Maslovs", "7 days ago", "Initial commit"]
DEBUG:git_wayback_machine::history: Inspect 1: Entry: "921ebcd" "7 days ago" "Leonids Maslovs": "Initial commit"
DEBUG:git_wayback_machine::history: Inspect 2: Entry: "\u{233}\u{2}\u{682}\u{7f}\u{0}" "\n\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{3cc0}" "\u{f}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{633}\u{2}\u{682
}\u{7f}\u{0}": "\u{682}\u{7f}\u{0}\u{0}\u{16}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}3\u{2}\u{682}\u{7f}\u{0}\u{0}\u{7}"
// KATA
#![feature(convert)]
use std::result::Result as StdResult;
use std::io;
use std::process::Command;
use std::path::{Path,PathBuf};
use std::error::Error;
use std::ffi::OsStr;
use std::fmt;
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <senko.rasic@dobarkod.hr>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of