- Author
Tiago Alves Macambira [tmacam burocarata org]
- Licence
Creative Commons By-SA
Table of Contents
" Sample .vimrc file by Martin Brochhaus | |
" Presented at PyCon APAC 2012 | |
" ============================================ | |
" Note to myself: | |
" DO NOT USE <C-z> FOR SAVING WHEN PRESENTING! | |
" ============================================ | |
# just in case | |
curl -XDELETE http://localhost:9200/inall | |
curl -XPUT http://localhost:9200'/inall/' -d '{ | |
"mappings": { | |
"thing": { | |
"include_in_all": false, | |
"type": "object", | |
"_all" : { |
#ifndef PRODUCER_CONSUMER_QUEUE_HPP_ | |
#define PRODUCER_CONSUMER_QUEUE_HPP_ | |
// Based on code from http://www.justsoftwaresolutions.co.uk/threading/implementing-a-thread-safe-queue-using-condition-variables.html | |
// Original version by Anthony Williams | |
// Modifications by Michael Anderson -- https://gist.github.com/482342 | |
#include <boost/thread.hpp> |
# -*- coding: utf-8 -*- | |
from datetime import datetime | |
import time | |
import sublime_plugin | |
class TimestampCommand(sublime_plugin.EventListener): | |
"""Expand `isoD`, `now`, `datetime`, `utcnow`, `utcdatetime`, | |
`date` and `time` |
%YAML 1.2 | |
--- | |
# See http://www.sublimetext.com/docs/3/syntax.html | |
name: relatorio | |
file_extensions: [md] | |
scope: text.html.markdown | |
contexts: | |
main: | |
- match: '\b(PENDING)\b' | |
scope: keyword.control.c |
from dataclasses import dataclass | |
import pathlib | |
import yaml | |
from operator import itemgetter | |
YAML_SUFFIX_LENGTH = len('.yaml') | |
@dataclass | |
class Component: | |
building_block: str |
#!/usr/bin/python | |
# vim:ts=4:sts=4:sw=4:et:wrap:ai:fileencoding=utf-8: | |
"""A collection of string normalization routines. | |
You are probably looking for normalize_string, that does an aggressive (but | |
arguably sound) string normalization process. | |
""" | |
#!/bin/bash | |
set -e | |
selected=$( | |
dialog --radiolist "Choose cluster" 0 0 0 $( | |
kubectl config get-contexts | sed -e 's/^ /off/' -e 's/^\*/on/' -e 1d | awk '{print $2,$3,$1 }' | |
) 2>&1 > /dev/tty | |
) |