git clone path/to/test/repo.git
git config push.default matching
git branch -a
* master
| import spark.streaming.StreamingContext._ | |
| import spark.streaming.{Seconds, StreamingContext} | |
| import spark.SparkContext._ | |
| import spark.storage.StorageLevel | |
| import spark.streaming.examples.twitter.TwitterInputDStream | |
| import com.twitter.algebird.HyperLogLog._ | |
| import com.twitter.algebird._ | |
| /** | |
| * Example of using HyperLogLog monoid from Twitter's Algebird together with Spark Streaming's |
| snmpd: | |
| pkg.installed: | |
| - name: {{ pillar['snmpd'] }} | |
| - order: 1 | |
| /etc/snmp/snmpd.conf: | |
| file.managed: | |
| - source: salt://etc/snmp/snmpd.conf | |
| - template: jinja | |
| - requires: |
| {:provider "vmfest" | |
| :environment{ | |
| :phases {:bootstrap | |
| (fn [session] | |
| (let [p (ns-resolve | |
| 'pallet.action.package 'package-manager)] | |
| (-> | |
| session | |
| (p :configure :proxy "http://10.0.2.2:3128"))))} | |
| :proxy "http://10.0.2.2:3128"}} |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export2.dtd"> | |
| <en-export export-date="20120727T073610Z" application="Evernote" version="Evernote Mac 3.0.5 (209942)"> | |
| <note><title>Vim Tips</title><content><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| <!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"> | |
| <en-note style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"> | |
| yank for copy, delete for cut, put for parse | |
| <div><br/></div> | |
| <div>Move in context, not position</div> | |
| <div>/ search forward</div> |
| /* | |
| Copyright 2012-2021 Viktor Klang | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software |
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'redcarpet' | |
| require 'pygments.rb' | |
| class HTMLwithPygments < Redcarpet::Render::HTML | |
| def block_code(code, language) | |
| Pygments.highlight(code, :lexer => language.to_sym, :options => { | |
| :encoding => 'utf-8' | |
| }) |
| import com.newrelic.api.agent.NewRelic | |
| import collection.mutable.{HashMap, SynchronizedMap} | |
| import com.yammer.metrics.{Timer, MetricsGroup} | |
| trait Measurable { | |
| protected lazy val metricsGroup = new MetricsGroup(this.getClass) | |
| private val timers = new HashMap[String, Timer] with SynchronizedMap[String, Timer] |
| let btnUp = new Button("Increment", Visible=true) | |
| let btnDown = new Button("Decrement", Visible=true) | |
| let lbl = new Label(Text=" Count: 0", Visible=true) | |
| Event.merge | |
| (btnUp.Clicked |> Event.map (fun _ -> +1)) | |
| (btnDown.Clicked |> Event.map (fun _ -> -1)) | |
| |> Event.scan (+) 0 | |
| |> Event.map (sprintf " Count: %d") | |
| |> Event.add (fun s -> lbl.Text <- s) |
| scala> import PimpGrepToCollection._ | |
| import PimpGrepToCollection._ | |
| scala> List("123", "156", "C").grep("\\d"){_.toInt} | |
| res0: List[Int] = List(123, 156) | |
| scala> Set("123", "456", "XXX").grep("\\d"){_.toInt} | |
| res1: scala.collection.immutable.Set[Int] = Set(123, 456) | |
| scala> Vector("A", "100", "XXX").grep("\\d"){_.toInt} |