This file contains hidden or 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/sh | |
| # /share/MD0_DATA/.qpkg/autorun/autorun-plexconnect.sh | |
| # chmod +x /share/MD0_DATA/.qpkg/autorun/autorun-plexconnect.sh | |
| curl -L https://gist.github.com/tommeier/6255771/raw/update_plex_connect.sh | bash & |
This file contains hidden or 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 com.example.actors.github | |
| import spray.httpx.Json4sSupport | |
| import org.json4s.{DefaultFormats, Formats} | |
| /** | |
| * Marshalling/Unmarshalling for the github json format | |
| * | |
| * see http://developer.github.com/v3/oauth/#web-application-flow | |
| */ |
This file contains hidden or 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
| export MYSQL_HOST="127.0.0.1" | |
| echo "exported to" | |
| echo $MYSQL_HOST # <--- here i get 127.0.0.1 | |
| # start php-fpm | |
| service php5-fpm start |
This file contains hidden or 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
| stage { 'first': | |
| before => Stage['main'], | |
| } | |
| # be hacky first update sources list, before main stage | |
| class apt_update { | |
| exec { "update_sources_list": | |
| command => "/usr/bin/apt-get update", | |
| } | |
| } |
This file contains hidden or 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.joda.time.DateTimeZone; | |
| import org.joda.time.format.DateTimeFormat; | |
| import org.junit.Assert; | |
| import org.junit.Test; | |
| import org.junit.runner.RunWith; | |
| import org.junit.runners.JUnit4; | |
| import java.util.Date; | |
| @RunWith(JUnit4.class) |
This file contains hidden or 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
| return DateTimeFormat.forPattern(getTextFormat()) | |
| .parseDateTime(value.toString()) | |
| .withZoneRetainFields(DateTimeZone.UTC) | |
| .toDate(); |
This file contains hidden or 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 java.util.Arrays; | |
| import java.util.List; | |
| public class Runner { | |
| public interface Task { | |
| void run(); | |
| default void cancel() { | |
| // do nothing | |
| } |
This file contains hidden or 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
| <?php | |
| /* direct access */ | |
| $dispatcher->addSubscriber(new \Statistics\Handler\MongoHandler($app['mongo'])); | |
| /* equals to */ | |
| /* @var $mongoService \MongoService */ | |
| $mongoService = $app['mongo']; | |
| $dispatcher->addSubscriber(new \Statistics\Handler\MongoHandler($mongoService)); |
This file contains hidden or 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
| $thumbHeights: 15, 30, 25, 40; | |
| @each $height in $thumbHeights { | |
| img.thumbnail-#{$height} { | |
| height: #{$height}px; | |
| } | |
| } |
This file contains hidden or 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
| @(doc: Document) | |
| @import com.example.Document | |
| @import com.example.html.layout; | |
| @layout(title = "Home") { | |
| <h1>Hello @doc.getDocumentTitle !</h1> | |
| } |