This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| # xml-simple has a bug that needs to be fixed before this works, see: | |
| # https://github.com/pdf/xml-simple/commit/b4da34165c88fe912b45af614b326ed512a666c7 | |
| require 'xmlsimple' | |
| # domain1 omits the __value__ key except where required | |
| domain1 = { | |
| "@type"=>"kvm", | |
| "name"=>"demo1", | |
| "uuid"=>"4dea24b3-1d52-d8f3-2516-782e98a23fa1", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| msgs = {} | |
| state = nil | |
| id = nil | |
| mqstdout.each_line do |line| | |
| line.strip! | |
| case | |
| when state.nil? && /^(?<msgid>[0-9A-F]+)\s+(?<size>[0-9]+)\s+(?<date>.+[^\s])\s+(?<sender>[^\s]+)$/ =~ line | |
| id = msgid | |
| msgs[id] = { | |
| size: size.to_i, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| # Usage: | |
| # rsync_parallel.sh [--parallel=N] [rsync args...] | |
| # | |
| # Options: | |
| # --parallel=N Use N parallel processes for transfer. Defaults to 10. | |
| # | |
| # Notes: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh -e | |
| # Maximum acceptable decimal colour representation | |
| hostcolour_max_dec=16777215 | |
| # Requires the `rand` command, this doesn't seem to be packaged on some distros in the standard repositories | |
| # If anyone knows of an alternative that will take a seed, a max, and is more widely available, let me know. | |
| # Generate decimal colour | |
| hostcolour_bg_dec="$(rand -M ${hostcolour_max_dec} -s $(printf "%.0f" "$(echo -n $(hostname -f) | md5sum | sed 's#^\([^[:space:]]*\).*$#0x\1#g')" 2>/dev/null | sed -e 's#^.*\([0-9]\{18\}\)$#\1#g'))" | |
| # Convert to hex | |
| hostcolour_bg_hex="$(printf "%06x" ${hostcolour_bg_dec})" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| I/davdroid.DavSyncAdapter( 5048): Performing sync for authority com.android.calendar | |
| D/davdroid.DavSyncAdapter( 5048): Creating new DavHttpClient | |
| V/davdroid.TlsSniSocketFactory( 5048): Setting allowed TLS protocols: TLSv1, TLSv1.1, TLSv1.2 | |
| I/davdroid.DavHttpClient( 5048): Wire logging active, disabling HTTP compression | |
| D/davdroid.DavSyncAdapter( 5048): Server supports VCard version 3.0 | |
| V/davdroid.URIUtils( 5048): Normalized URL https://dav.example.com/caldav/199/ -> https://dav.example.com/caldav/199/ | |
| D/davdroid.WebDavResource( 5048): Using preemptive authentication (not compatible with Digest auth) | |
| I/davdroid.SyncManager( 5048): Remotely removing 0 deleted resource(s) (if not changed) | |
| I/davdroid.SyncManager( 5048): Uploading 1 new resource(s) (if not existing) | |
| V/davdroid.URIUtils( 5048): Normalized URL 20150303T004851Z-5048_4579225c66f01453.ics -> 20150303T004851Z-5048_4579225c66f01453.ics |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "CreateIndex":553, | |
| "ModifyIndex":553, | |
| "LockIndex":0, | |
| "Key":"network/eth0/inet/dhcp/", | |
| "Flags":0, | |
| "Value":null | |
| }, | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Jul 02 09:33:05 hostname influxd[21546]: 2015/07/02 09:33:05 TSDB listener accept &{0xc208932020 0xc2094a0060} | |
| Jul 02 09:34:08 hostname influxd[21546]: 2015/07/02 09:34:08 TSDB listener accept &{0xc2093eeba0 0xc208a7c180} | |
| Jul 02 09:37:59 hostname influxd[21546]: 2015/07/02 09:37:59 TSDB listener accept &{0xc20868c020 0xc208df21e0} | |
| Jul 02 09:38:05 hostname influxd[21546]: 2015/07/02 09:38:05 TSDB listener accept &{0xc2091fa370 0xc208df20c0} | |
| Jul 02 09:38:40 hostname influxd[21546]: [shard] 2015/07/02 09:38:40 flush 7964 points in 0.069s | |
| Jul 02 09:38:40 hostname influxd[21546]: [shard] 2015/07/02 09:38:40 flush 7776 points in 0.081s | |
| Jul 02 09:38:40 hostname influxd[21546]: [shard] 2015/07/02 09:38:40 flush 8610 points in 0.086s | |
| Jul 02 09:38:41 hostname influxd[21546]: [shard] 2015/07/02 09:38:41 flush 8928 points in 0.089s | |
| Jul 02 09:38:41 hostname influxd[21546]: [shard] 2015/07/02 09:38:41 flush 7968 points in 0.085s | |
| Jul 02 09:38:41 hostname influxd[21546]: [shard] 2015/07/02 09:38:41 flush 8050 points in 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Flex, Box } from './flexbox.jsx'; | |
| // A basic example. Note that the number of grid columns is not fixed, | |
| // instead you simply specify sizes as fractions (or decimals between | |
| // 0.0 and 1.0), and the items will be sized appropriately. For example, | |
| // the outer <Flex/> is full size at the `xs` breakpoint, 2/3 of full size | |
| // at the `md` breakpoint, and 1/2 at `lg` or higher. | |
| export const Basic (props) => ( | |
| <Flex xs={1} md={2 / 3} lg={1 / 2} auto > | |
| <Box auto /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "github.com/gopherjs/vecty" | |
| "github.com/gopherjs/vecty/elem" | |
| "github.com/gopherjs/vecty/event" | |
| "github.com/pdf/vectyx/router" | |
| ) | |
| type App struct { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "encoding/hex" | |
| "fmt" | |
| "math/rand" | |
| "github.com/gopherjs/vecty" | |
| "github.com/gopherjs/vecty/elem" | |
| "github.com/gopherjs/vecty/event" |
OlderNewer