This file contains 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
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You 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 | |
This file contains 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
<plugins> | |
<simpleAuthenticationPlugin> | |
<users> | |
<authenticationUser | |
username="user" | |
password="test" | |
groups="admins,publishers,consumers" | |
/> | |
</users> | |
</simpleAuthenticationPlugin> |
This file contains 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
class Fetch(val url:String) extends Runnable{ | |
override def run{ | |
println(scala.io.Source.fromURL(url).mkString) | |
} | |
} | |
val urls = List("http://news.com", "http://cnn.com", "http://stackoverflow.com", "http://abc.com") | |
val threads = urls.map{ url => | |
val thread = new Thread(new Fetch(url)) |
This file contains 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
# helper functions for managing processes | |
def run_system_command(cmd) | |
puts cmd | |
status = system(cmd) | |
$?.exitstatus | |
end | |
def kill_matching_process_cmd(process_name) | |
cmd = "echo `ps -ef | grep -v grep | grep \"#{process_name.gsub("-", "\\-")}\" | awk '{print $2}'` | xargs kill" |
This file contains 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 org.junit.{Test, Assert} | |
import org.junit.Assert._ | |
import net.liftweb.json._ | |
import net.liftweb.json.Serialization.write | |
case class Library(name:String, docs:List[Option[String]]) | |
class AppTest{ | |
@Test | |
def testMain{ |
This file contains 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
# Colors from http://wiki.archlinux.org/index.php/Color_Bash_Prompt | |
# misc | |
NO_COLOR='\e[0m' #disable any colors | |
# regular colors | |
BLACK='\e[0;30m' | |
RED='\e[0;31m' | |
GREEN='\e[0;32m' | |
YELLOW='\e[0;33m' | |
BLUE='\e[0;34m' | |
MAGENTA='\e[0;35m' |
This file contains 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 imagej; | |
import ij.*; | |
import ij.io.*; | |
import ij.process.*; | |
import java.io.*; | |
import javax.imageio.*; | |
import javax.imageio.stream.*; | |
import java.awt.image.BufferedImage; |
This file contains 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 'openssl' | |
require 'uri' | |
require 'net/http' | |
require 'net/https' | |
require 'base64' | |
require 'optparse' | |
class CloudfrontDistribution |
This file contains 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
{{Redirect|Anarchist|the fictional character|Anarchist (comics)}}{{Redirect|Anarchists}}{{about|the political philosophy|the medical condition|Anorchism}}{{Anarchism sidebar}}{{Libertarianism sidebar}}'''Anarchism''' is generally defined as the [[political philosophy]] which holds the [[state (polity)|state]] to be undesirable, unnecessary, and harmful,<ref name="definition">{{Cite journal|last=Malatesta|first=Errico|title=Towards Anarchism|journal=MAN!|publisher=International Group of San Francisco|location=Los Angeles|oclc=3930443|url=http://www.marxists.org/archive/malatesta/1930s/xx/toanarchy.htm|authorlink=Errico Malatesta}}{{Cite journal|url=http://www.theglobeandmail.com/servlet/story/RTGAM.20070514.wxlanarchist14/BNStory/lifeWork/home/|title=Working for The Man |journal=[[The Globe and Mail]] |accessdate=2008-04-14 |last=Agrell |first=Siri |date=2007-05-14}}{{cite web|url=http://www.britannica.com/eb/article-9117285|title=Anarchism|year=2006|work=Encyclopædia Britannica|publisher=Encyclopædia Britanni |
This file contains 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
solrconfig.xml: | |
<requestHandler class="solr.SearchHandler" name="ac" default="true" > | |
<lst name="defaults"> | |
<str name="defType">edismax</str> | |
<str name="rows">10</str> | |
<str name="fl">*,score</str> | |
<str name="qf">title^50.0 textng^40.0</str> | |
<str name="pf">textnge^50.0</str> | |
<str name="debugQuery">false</str> | |
<str name="timeAllowed">5000</str> |