Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| # Ring the bell if any background window rang a bell | |
| set -g bell-action any | |
| # Default termtype. If the rcfile sets $TERM, that overrides this value. | |
| set -g default-terminal screen-256color | |
| # Keep your finger on ctrl, or don't | |
| bind-key ^D detach-client | |
| # Create splits and vertical splits |
| package main | |
| import ( | |
| "flag" | |
| "net/http" | |
| "log" | |
| "net/url" | |
| "encoding/json" | |
| "os" | |
| "io/ioutil" |
| import kotlin.coroutines.experimental.buildIterator | |
| import kotlin.reflect.KProperty1 | |
| import kotlin.reflect.full.findAnnotation | |
| import kotlin.reflect.full.memberProperties | |
| @Target(AnnotationTarget.PROPERTY) | |
| annotation class JsonFileld | |
| interface JsonSerializable |
| import kotlin.reflect.full.findAnnotation | |
| import kotlin.reflect.full.memberProperties | |
| @Target(AnnotationTarget.PROPERTY) | |
| annotation class JsonFileld | |
| interface JsonSerializable | |
| private fun JsonSerializable.serialize() = javaClass.kotlin.memberProperties.asSequence() | |
| .filter { |
| import kotlin.reflect.full.memberProperties | |
| data class File(val type: Int = 0, val name: String) | |
| private fun Any.serialize() = javaClass.kotlin.memberProperties.asSequence() | |
| .filter { | |
| when (it.get(this)) { | |
| is String, is Int -> true | |
| else -> false | |
| } |
| #!/usr/bin/env python | |
| # This program is free software. It comes without any warranty, to the extent | |
| # permitted by applicable law. You can redistribute it and/or modify it under | |
| # the terms of the Do What The Fuck You Want To Public License, Version 2, as | |
| # published by Sam Hocevar. See http://www.wtfpl.net/ for more details. | |
| """ | |
| This is a simple daemon implementing freedesktop.org's file manager interface | |
| (http://www.freedesktop.org/wiki/Specifications/file-manager-interface/). |
| #!/usr/bin/env python | |
| import dbus | |
| class Client(): | |
| def __init__(self): | |
| bus = dbus.SessionBus() | |
| service = bus.get_object('com.example.service', "/com/example/service") | |
| self._message = service.get_dbus_method('get_message', 'com.example.service.Message') | |
| self._quit = service.get_dbus_method('quit', 'com.example.service.Quit') |
| /* $CC -o xresources_test xresources_test.c -lX11 */ | |
| #include <X11/Xresource.h> | |
| #include <string.h> | |
| #include <stdio.h> | |
| #define XRESOURCE_LOAD_STRING(NAME, DST) \ | |
| XrmGetResource(db, NAME, "String", &type, &ret); \ | |
| if (ret.addr != NULL && !strncmp("String", type, 64)) \ | |
| DST = ret.addr; |