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
repositories { | |
jcenter() | |
maven { url "https://jitpack.io" } | |
} | |
dependencies { | |
compile 'com.github.hosopy:actioncable-client-kotlin:0.0.1' | |
} |
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 kotlinx.coroutines.experimental.* | |
import kotlinx.coroutines.experimental.channels.Channel | |
class SerializedOperationQueue(name: String = "EventLoop", capacity: Int = 0) { | |
private val singleThreadContext = newSingleThreadContext(name) | |
private val queue = Channel<suspend () -> Unit>(capacity).also { | |
launch(singleThreadContext) { | |
for (operation in it) { | |
operation.invoke() | |
} |
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": "ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper", | |
"wrapped": "SleepJob", | |
"queue": "default", | |
"args": [ | |
{ | |
"job_class": "SleepJob", | |
"job_id": "49f612ef-233a-4660-b9e7-cc48a80ee7d4", | |
"provider_job_id": null, | |
"queue_name": "default", |
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 Foundation | |
import UIKit | |
import RemoteClient | |
class HelloWorldViewController: UIViewController { | |
... | |
@IBAction func requestButtonPressed(sender: UIButton) { | |
// For debug | |
// 非SSLでの接続には必要 |
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/bash | |
# Set your credentials if you want to configure locally. | |
#export AWS_ACCESS_KEY_ID=PUT_YOUR_ACCESS_KEY | |
#export AWS_SECRET_ACCESS_KEY=PUT_YOUR_SECRET_ACCESS_KEY | |
#export AWS_DEFAULT_REGION=ap-northeast-1 | |
S3_BUCKET=PUT_YOUR_BACKET_NAME | |
NUM_TO_KEEP_BACKUP=7 |
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
public interface GitHubService { | |
/** | |
* 指定されたユーザのリポジトリリストを取得. | |
* | |
* @param user | |
* @reeturn Call<List<Repository>> | |
*/ | |
@GET("/users/{user}/repos") | |
Call<List<Repository>> listRepos(@Path("user") String user); | |
} |
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
$ cd /home/git/gitlab | |
$ sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production |
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 Item extends RealmObject { | |
... | |
private RealmList<Comments> comments; | |
... | |
public RealmList<Comments> getComments() { | |
return comments; | |
} | |
public void setComments(RealmList<Comments> comments) { |