To generate a pom.xml file just run gradle writeNewPom
If you want to generate it as pom.xml in the root of the project, replace writeTo("$buildDir/newpom.xml")
with writeTo("pom.xml")
/* We've run into a few common pitfalls when dealing with Futures in Scala, so I wrote these three helpful | |
* classes to give some baked-in functionality. | |
* | |
* I'd love to hear about other helpers you're using like these, or if you have improvement suggestions. | |
* [email protected] / @connerdelights | |
*/ | |
import scala.concurrent.{ExecutionContext, CanAwait, Awaitable, Future, Promise} | |
import scala.concurrent.duration.Duration | |
import scala.util.Try |
To generate a pom.xml file just run gradle writeNewPom
If you want to generate it as pom.xml in the root of the project, replace writeTo("$buildDir/newpom.xml")
with writeTo("pom.xml")
-- Remove the history from | |
rm -rf .git | |
-- recreate the repos from the current content only | |
git init | |
git add . | |
git commit -m "Initial commit" | |
-- push to the github remote repos ensuring you overwrite history | |
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git |
Answers http://stackoverflow.com/questions/10373318/mixing-in-a-trait-dynamically.
Compile as follows: scalac Common_1.scala Macros_2.scala scalac Common_1.scala Test_3.scala -cp
Tested in 2.10.0
===Common_1.scala===
import akka.util.{Duration, NonFatal} | |
import akka.actor.Scheduler | |
import akka.dispatch.{Promise, ExecutionContext, Future} | |
// Copied from Akka 2.1-M1 | |
trait FutureTimeoutSupport { | |
/** | |
* Returns a [[akka.dispatch.Future]] that will be completed with the success or failure of the provided value | |
* after the specified duration. | |
*/ |
sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00).{9}(\x00\x51)|$1\x41\x50\x50\x4C\x45\x20\x53\x53\x44$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage | |
sudo kextcache -system-prelinked-kernel | |
sudo kextcache -system-caches | |
sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage.original /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.
ADD JAR s3://<s3-bucket>/jars/hive_contrib-0.5.jar; | |
CREATE TEMPORARY FUNCTION now as 'com.mt.utils.udf.Now'; | |
CREATE TEMPORARY FUNCTION user_agent_f as 'com.mt.utils.UserAgent'; | |
set hive.merge.mapredfiles=true; | |
set hive.merge.mapfiles=true; | |
set hive.merge.size.per.task=500000000; | |
CREATE EXTERNAL TABLE data |
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- | |
%% ex: ft=erlang ts=4 sw=4 et | |
[ | |
%% Riak Core config | |
{riak_core, [ | |
%% Default location of ringstate | |
{ring_state_dir, "/riak/ring"}, | |
%% http is a list of IP addresses and TCP ports that the Riak | |
%% HTTP interface will bind. |
$ diff -u riakclient.proto.piqi riakclient.proto.piqi.edited | |
--- riakclient.proto.piqi 2012-02-08 20:55:35.000000000 -0600 | |
+++ riakclient.proto.piqi.edited 2012-02-08 20:55:25.000000000 -0600 | |
@@ -299,6 +299,7 @@ | |
] | |
.field [ | |
.name done | |
+ .ocaml-name "ocaml_done" | |
.type bool | |
.optional |