Skip to content

Instantly share code, notes, and snippets.

@pcarrier
pcarrier / x11.md
Last active August 29, 2015 13:56

X11 root window default texture in PNG

Compile with grep -vE '#|>' x11.md | xxd -p -r > x11.png
Result visible here

PNG header

8950 4e47 0d0a 1a0a
Exception in thread "main" javax.xml.ws.WebServiceException: Unknown class type javax.xml.transform.dom.DOMSource
at com.sun.xml.internal.ws.api.pipe.Stubs.createDispatch(Stubs.java:274)
at com.sun.xml.internal.ws.client.WSServiceDelegate.createDispatch(WSServiceDelegate.java:504)
at com.sun.xml.internal.ws.client.WSServiceDelegate.createDispatch(WSServiceDelegate.java:531)
at com.sun.xml.internal.ws.client.WSServiceDelegate.createDispatch(WSServiceDelegate.java:510)
at com.sun.xml.internal.ws.client.WSServiceDelegate.createDispatch(WSServiceDelegate.java:478)
at javax.xml.ws.Service.createDispatch(Service.java:352)
From git@github.com:airbnb/plog branch master
- Create a config file with:
$ echo 'plog.server.udp.listeners=[{handlers=[{provider="com.airbnb.plog.stress.EaterProvider"}]}]' > plog-server/src/main/resources/application.conf
- Fire up the server with './gradlew run'
- Package with './gradlew shadowJar'
- Run the stresser with:
Checks
======
plog
----
- initialize check class [ERROR]: Exception('init_config:\n\ninstances:\n\t- port: 23456\n',)
#!/usr/bin/env ruby
require 'yaml'
require 'murmurhash3'
require 'bundler'
require 'set'
def node_for name
"n#{MurmurHash3::V32.str_hash(name).to_s(16)}"
end
deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu precise-security main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted universe multiverse
deb http://ddebs.ubuntu.com precise main restricted universe multiverse
deb http://ddebs.ubuntu.com precise-updates main restricted universe multiverse
package com.example;
class Hello {
// Simple example (unknown field name, namespace "com/example/Hello", id "noop")
@Logged
native void noop(int a);
// Complex example (known field names, namespace "com/example", id "fooed")
@Logged(id="fooed", namespace="com/example", fields=["from", "to"])
void foo(@LogFormat(As.HASHCODE) Bar source, @LogFormat(As.IDENTITY) Baz dest);
}
import qualified Data.Map as M
import XMonad
import qualified XMonad.StackSet as W
import XMonad.Actions.DynamicWorkspaces
import XMonad.Config.Kde
import XMonad.Hooks.SetWMName
import XMonad.Prompt
#include <xcb/xcb.h>
#include <stdio.h>
/*
gcc -o xcbtest xcbtest.c -lxcb
*/
int main() {
int i = -1;
xcb_connection_t *c;
# IPv4 address of eth0, assuming eth0 has only one IPv4 address..
require 'ohai'
sys = ::Ohai::System.new
sys.all_plugins
node = sys.data
node['network']['interfaces']['eth0']['addresses'].find {|k,v| v['family'] == 'inet'}.first