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 controllers | |
import akka.util.Timeout | |
import org.scalatest.FunSuite | |
import org.scalatest.matchers.ShouldMatchers | |
import play.api.libs.json.JsValue | |
import play.api.libs.ws.WS | |
import scala.concurrent.duration._ | |
import scala.concurrent.{Await, Future} |
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 hellofest; | |
import static hellofest.DateEquals.areEquals; | |
import static java.util.Arrays.asList; | |
import static org.fest.assertions.Assertions.assertThat; | |
import java.util.Date; | |
import java.util.List; | |
import org.junit.Test; | |
public class AssertMeThis { |
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
function clickThis(anchorObj) { | |
var evt = document.createEvent("MouseEvents"); | |
evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); | |
var allowDefault = anchorObj.dispatchEvent(evt); | |
} | |
var nodeL = document.querySelectorAll(".highcharts-legend-item"); | |
for(var i = 0;i<nodeL.length;i++) { | |
clickThis(nodeL.item(i)); | |
} |
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
#!/bin/bash | |
ip=$(ifconfig | grep "inet addr" | grep -v "127") | |
/usr/bin/python << EOF 2>&1 >> /tmp/mailip.log | |
import smtplib | |
from email.mime.text import MIMEText | |
msg = MIMEText(" ") | |
msg['Subject'] = 'Rasp IP %s' % "${ip}" |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(100); |
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
<html> | |
</html> |
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
function save(o) { | |
if (!db.icalstreams.count({defaultTag:o.defaultTag}) ) { | |
db.icalstreams.save(o); | |
} else { | |
print(o.defaultTag,"already exist"); | |
} | |
} | |
if (db.getName() === "OneCalendar") { | |
save({ "url" : "http://lacantine.org/events/feed.ics", "defaultTag" : "lacantine" }); | |
save({ "url" : "http://www.parinux.org/calendar/ical", "defaultTag" : "parisnux" }); |
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
use OneCalendar | |
db.events.save({ | |
"title" : "my great record", | |
"begin" : NumberLong(new String(new Date(new Date().getTime()+1000*60*60*24).getTime())), | |
"end" : NumberLong(new String(new Date(new Date().getTime()+3000*60*60*24).getTime())), | |
"location" : "anywhere i want", | |
"description" : "", | |
"tags" : [ | |
"TAG1" | |
] |
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
PURPLE=$(echo -en "\033[35m") | |
GREEN=$(echo -en "\033[32m") | |
RED=$(echo -en "\033[31m") | |
YELLOW=$(echo -e "\033[33m") | |
BLUE=$(echo -e "\033[1;34m") | |
NORMAL=$(echo -e "\033[0m") | |
mvn2() { | |
mvn $* | sed \ | |
-e "s/^\(.ERROR. .*\)$/$RED\1$NORMAL/ ; #contain ERROR start 2nd char |
NewerOlder