12/21/2013

How to export Mixpanel people properties to an Excel compatible CSV

At Bringr our salesman wanted to be able to export all people properties from Mixpanel to Excel. Mixpanel does have an API for that however, like any API, it is not really user friendly. To solve this I rapidly developed a bookmarklet to export every people properties with just a single click. I think we are not alone in this situation so I am sharing it, enjoy!

A bookmarklet that exports an Excel compatible CSV of the first 1000 people (with all their properties) from Mixpanel > People > Explore.

Mixpanel Export People Properties on Github


12/10/2013

Scala equivalent of JavaScript ~.apply and Python unpacking

In Scala unpacking arguments in the context of a method call is achieved with an array argument followed by a colon and an _* symbol, like so:


Applying an array argument only works with functions that use repeated parameters, like print[A](args: A*) above.


Note: JavaScript Function::apply, requires a calling object as the first argument and works on any function (unlike in scala) so it's not quite the same.
11/29/2013

How to change Play framework default development port once and for all

The following trick will only work in developpment env., to change the default port in production use -Dhttp.port=9001 instead.
11/28/2013

Scrolling animated EPSI logo with SASS/JS

I was kind of tired yesterday night to do any more work on Bringr or Redsmin. So while procrastinating on the internet I discovered the picture below of my old graduate school (EPSI Nantes) where I now teach JavaScript and NoSQL from time to time.



...  I wondered how fast I could write this logo in CSS/HTML, so I started to do it. Then once it I was done, I wondered how I could animate it while scrolling. In order to do that I used skrollr and skrollr-stylesheet and here we are:

I find the result kind of neat for a small one night project like that!

Notes:
  • It was only tested on Chrome 31+
  • The animation is really slow on iPhone 4 but works well on later version.
11/11/2013

Redsmin Enterprise, sorted fields and keys, confirmation on destructive ops…

In the last weeks we received a lot of useful feedbacks from our users so we would like to thank you all for that! We are working hard on Redsmin and started to think technically about Redsmin Enterprise thanks to the deep knowledge of linux hackers like @keruspe.
The following weeks are going to be really exciting, stay tuned and don’t forget to come say hi!
Read the entire article on Redsmin Blog
11/09/2013

Introducing a CLI for InfluxDB, the scalable datastore for time series of metrics and events

I can't say how much I'm excited by InfluxDB right now. For months I was looking for an alternative to the hard to scale RRDTool and Whisper projects and was even thinking to implement my own distributed time-series database. And then the guys at Errplane released InfluxDB.



InfluxDB is announced to be production ready before January but I wanted to play around with it already. Just to see with my own eyes if it was filling the gap for my use case at Redsmin. The client libraries are really new. The NodeJS client is only 1 day old as I'm writing this.


So as I tested InfluxDB against Redsmin monitoring service, I was looking for a way to write and execute InfluxDB SQL queries rapidly and display the results inside the terminal. Since InfluxDB, due to its maturity, lacks of tools, I decided to create my own InfluxDB-CLI.


npm install influxdb-cli -g

InfluxDB and InfluxDB-CLI have a long way to go before being production ready but I really hope it will help newcomers discover and use this amazing project.

10/21/2013

Redsmin is finally out of beta!

A little more than one year ago, I took the challenge to write a modern real-time Redis GUI in order to improve my workflow with Redis and to help me write, debug and monitor my Redis servers at Bringr, a real-time monitoring and publishing solution for creating value from social media activity.
Redsmin now helps daily thousands of developers around the world speeding up their workflow.
Read the entire article on Redsmin Blog
10/02/2013

How to do one-time expression evaluation of HTML5 data-* attributes in AngularJS

There are no easy way to do a one-time expression evaluation with AngularJS. The easiest way would be to code a directive but it's most of the time better to not reinvent the wheel.

Bindonce is a small library for AngularJS that provides one-time evaluation (thus zero watchers) for AngularJS. Since Bindonce 0.2+, it's now possible to evaluate any kind of attributes thanks to bo-attr-*.

Let's say we use bootstrap and want to specify dynamically some content generated by JavaScript inside our popover. Using bindonce we just have to write

<div bindonce ng-controller="MyCtrl">

  <div bo-attr 
       bo-attr-data-content="content" 
       bo-attr-data-html="isHtml" 
       bo-attr-data-title="title" 
       bo-attr-data-placement="placement" 
       data-toggle="popover">
    <i class="icon icon-question-sign"></i>
  </div>

</div>

Title, isHtml and content will be evaluated only one time and put inside attr-data-* attributes. From this point we could write our own directive to abstract the creation of our bootstrap popover but that's another story.
9/19/2013

How to fix "Could not find or load main class org.apache.cassandra.tools.NodeCmd"

After upgrading Cassandra from 1.2.9 to 2.0 and Java from 1.6 to 1.7 (because Cassandra 2.0 does not work with Java 1.6 anymore), I got the following error while running nodetool: Could not find or load main class org.apache.cassandra.tools.NodeCmd
I could not find anything so here is a quick fix: nano `which nodetool`
/* replace */
for include in "`dirname "$0"`/cassandra.in.sh" \
/* with */
for include in "$HOME/.cassandra.in.sh" \

And then nodetool should work like a charm.

Update: The same trick works when cassandra-cli throws Error: Could not find or load main class org.apache.cassandra.cli.CliMain
9/17/2013

RedisTree - load & save Trees to Redis using sets

Today I answered this question on Stackoverflow on Getting hierchical data from redis with node.js. What was interesting with this one was that the implementation had to use Redis Set to build and save a tree. RedisTree offers an asynchronous implementation for storing and loading trees from Redis.

Usage


Tree format


Try it!

npm install redistree

... or view it on Github

9/10/2013

How I "hijacked" Topsy private search api to remove my first 5000+ tweets

[Update] This article was only a proof of concept oriented towards developers. Please don't ask for help in order to use this script because it may not work at all.


When my cofounder at Bringr told me that Topsy new search engine was able to look at every tweet published since 2006 I immediately tried to search my username to see my first tweets.

What a horrible sight, my first tweets from 2007 were disastrous, both in grammar and in content. In France, we like to think that we believe in what I would translate as the right to be forgotten (Le droit à l'oubli), in short it's the right be protected from search engine indexing things we posted years ago. Because sometimes we publish things online that we'll regret some years later (just look at all those kids that share too much of their personal lives on Twitter or Facebook).

So while I was playing with Topsy, I looked at the network exchange and discovered Topsy own search api.

Topsy private api
The endpoint:

http://otter.topsy.com/search.js?q={query}&offset=10&perpage={10-5000+}&window=a&sort_method=-date&apikey={apikey}

What's awesome about this endpoint is that perpage parameter allows to request more than 5000 tweets with just one call! I quickly wrote a (Java)Script (got it?) to download all those tweets and remove each one of them thanks to Twitter API own API. And it worked.

As usual the script is available on Github. Just edit the config.js file and run it. You'll need to create your own Twitter application and copy/paste your consumer_key/secret and access_token/secret.

Since Topsy does not require a login I wonder if they use the same apikey for everyone, don't hesitate to post your own observation on this matter!

git clone git@github.com:FGRibreau/twitterremover.git
cd twitterremover
npm install
vim config.js
node destroyThemAll


Oh, one last thing, because it's a private API you have no guarantee that this endpoint will work forever so don't build anything serious on it :).

Thanks for reading that far! If you liked it you may like what I share on

NB: Another way to achieve the same result would be to request a Twitter archive and then write a script to read it... but that would take all the fun away!
9/02/2013

How to make Play Framework 2 work with Supervisord and Monit

Let say you just developed an application called myapp with Play Framework 2. The application is located in /dir/to/myapp
Before going further run play clean compile stage to build the app production jar, then configure supervisord and monit like so
... et voila!

NB: Out of the box Play! will create a RUNNING_PID file into myapp/ but of course you can change its location with -Dpidfile.path.
7/17/2013

How to use ZINTERSTORE with both ZSETs and SETs

How to use ZINTERSTORE with both ZSETs and SETs on Redsmin Blog.
« »
 
 
Made with on a hot august night from an airplane the 19th of March 2017.
http://bit.ly/1II1u5L