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
| This gist is not runnable, groundify can't figure out | |
| its language. |
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
| game.backgroundMusic = loader.loadSound('audio/gurdonark-kindergarten'); | |
| game.slingshotReleasedSound = loader.loadSound("audio/released"); | |
| game.bounceSound = loader.loadSound('audio/bounce'); | |
| game.breakSound = { | |
| "glass": loader.loadSound('audio/glassbreak'), | |
| "wood": loader.loadSound('audio/woodbreak') | |
| }; |
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
| if (game.mode == "intro") { | |
| if (game.panTo(700)) { | |
| game.mode = "load-next-hero"; | |
| } | |
| } | |
| if (game.mode == "wait-for-firing") { | |
| if (mouse.dragging) { | |
| if (game.mouseOnCurrentHero()){ | |
| game.mode = "firing"; |
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
| FROM ubuntu:14.04 | |
| RUN apt-get update -qq && \ | |
| apt-get -qy install \ | |
| mono-mcs | |
| ENV FILE prog.cs | |
| ENV EXEC mcs $FILE && mono prog.exe | |
| ENV DEV /home/dev |
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
| events { | |
| worker_connections ${WORKERS:-1024}; | |
| } | |
| http { | |
| {{#config.websocket.on}} | |
| map $http_upgrade $connection_upgrade { | |
| default upgrade; | |
| '' close; |
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
| class ContainersController < DockerController | |
| %w( | |
| /json | |
| /:id/json | |
| /:id/top | |
| /:id/changes | |
| ).each do |route| | |
| get route do | |
| reroute_to_docker | |
| end |
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
| def stream(socket) | |
| curl = Curl::Easy.new(url) | |
| curl.on_body { |data| socket.write(data) } | |
| curl.on_header { |data| socket.write(data) } | |
| curl.multipart_form_post = true | |
| curl.http_post | |
| end |
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
| DockerProxy.prototype.hijack = function(req, clientSocket) { | |
| this.client({ | |
| method: req.method, | |
| uri: this.host+req.url | |
| }) | |
| .on('socket', function(dockerSocket) { | |
| dockerSocket.pipe(clientSocket); | |
| .pipe(dockerSocket); | |
| }); | |
| } |
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 _.mapValues({ca:'', cert:'', key:''}, (_value, cert) => { | |
| let filepath = path.resolve(certPath, `${cert}.pem`); | |
| return fs.readFileSync(filepath); | |
| }); |
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
| module MailDeliveries | |
| extend self | |
| extend Forwardable | |
| @@deliveries = ActionMailer::Base.deliveries | |
| def_delegators :@@deliveries, :last, :clear, :empty? | |
| end |