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
Show.select(:id, :tag).reduce({}) do |index, show| | |
index[show[:tag]] = show[:id] | |
index | |
end |
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
# Print log messages to the console, | |
# can also be done by passing the -v option to liquidsoap. | |
set("log.file.path","/tmp/<script>.log") | |
set("log.stdout", true) | |
# Socket control | |
set("server.socket",true) | |
set("server.socket.path","/tmp/liquidsoap-socket") | |
set("server.timeout",-1.0) |
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
class PostsController < AdminController | |
# ... snip ... | |
def update | |
if @post.update(post_params) | |
redirect_to url_for_redirect | |
else | |
render :show | |
end |
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
On Success: | |
[aws] [dynamodb] operation=put_item duration=0.042833 retries=0 error=false | |
On Error: | |
[aws] [dynamodb] operation=put_item duration=25.555756 retries=10 error=true | |
Note: I've only tested this with Dynamodb, but I suspect it should work for most of the AWS APIs |
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
import React from 'react'; | |
export default class AudioPlayer extends React.Component { | |
constructor() { | |
super(); | |
this.state = {}; | |
} | |
componentDidMount() { | |
this.audio = document.createElement('audio'); |
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
/* ***** BEGIN LICENSE BLOCK ***** | |
* Version: MPL 1.1/GPL 2.0/LGPL 2.1 | |
* | |
* The contents of this file are subject to the Mozilla Public License Version | |
* 1.1 (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* http://www.mozilla.org/MPL/ | |
* | |
* Software distributed under the License is distributed on an "AS IS" basis, | |
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
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
worker_processes 2; | |
error_log /var/log/nginx/openresty-error.log info; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
server { | |
listen 8000; |
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
$ git push origin master | |
>> To git@github.com:Miksago/Jet.js.git | |
>> ! [rejected] master -> master (non-fast forward) | |
>> error: failed to push some refs to 'git@github.com:Miksago/Jet.js.git' |
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
----------------------------------------------------------------------------------------------------------------- | |
Property / Method | Access | Type | Arguments | Returns | |
------------------------------------------------------------------------------------------------------------------ | |
Jet | |
_uri private | |
base Function() String | |
loaded Function() Array | |
resolve Function Namespace String | |
_namespaces private Object Object |