File | Purpose |
---|---|
/etc/compose/docker-compose.yml |
Compose file describing what to deploy |
/etc/systemd/system/docker-compose.service |
Service unit to start and manage docker compose |
/etc/systemd/system/docker-compose-reload.service |
Executing unit to trigger reload on docker-compose.service |
/etc/systemd/system/docker-compose-reload.timer |
Timer unit to plan the reloads |
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 UIKit | |
import AVKit | |
import AVFoundation | |
import AssetsLibrary | |
func synchronized(_ object: AnyObject, block: () -> Void) { | |
objc_sync_enter(object) | |
block() | |
objc_sync_exit(object) | |
} |
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
// | |
// RecordAudio.swift | |
// | |
// This is a Swift class (updated for Swift 5) | |
// that uses the iOS RemoteIO Audio Unit | |
// to record audio input samples, | |
// (should be instantiated as a singleton object.) | |
// | |
// Created by Ronald Nicholson on 10/21/16. | |
// Copyright © 2017,2019 HotPaw Productions. All rights reserved. |
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
IO.puts("I'm here! Sleeping for 2 seconds") | |
Process.sleep 2_000 # waiting for the other node | |
nodes = MapSet.new([:app@app1, :app@app2]) | |
other_node = | |
nodes | |
|> MapSet.delete(Node.self()) | |
|> MapSet.to_list() | |
|> List.first() |
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 SwiftUI | |
struct PinEntryView: View { | |
var pinLimit: Int = 4 | |
var isError: Bool = false | |
var canEdit: Bool = true | |
@Binding var pinCode: String | |
private var pins: [String] { |
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
let Uploaders = {} | |
Uploaders.S3 = function (entries, onViewError) { | |
entries.forEach(entry => { | |
let xhr = new XMLHttpRequest() | |
onViewError(() => xhr.abort()) | |
xhr.onload = () => (xhr.status === 200 ? entry.done() : entry.error()) | |
xhr.onerror = () => entry.error() | |
xhr.upload.addEventListener("progress", event => { | |
if (event.lengthComputable) { |
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
# Stop all containers | |
docker stop `docker ps -qa` | |
# Remove all containers | |
docker rm `docker ps -qa` | |
# Remove all images | |
docker rmi -f `docker images -qa ` | |
# Remove all volumes |
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 VideoToolbox | |
import AVFoundation | |
private var __canHWAVC: Bool = false | |
private var __tokenHWAVC: dispatch_once_t = 0 | |
public protocol NYXAVCEncoderDelegate : class | |
{ | |
func didEncodeFrame(frame: CMSampleBuffer) | |
func didFailToEncodeFrame() |
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
defmodule YourAppName.Search do | |
# ... | |
@doc """ | |
Queries listings. | |
""" | |
def query_listings(query, current_user) do | |
default_scope = from l in Listing, where: l.draft == false or l.user_id == ^current_user.id, order_by: [desc: l.updated_at], limit: 50 | |
id = _try_integer(query) |
NewerOlder