require "socket"
server = TCPServer.open(2626)
loop do
Thread.fork(server.accept) do |client|
client.puts("Hello, I'm Ruby TCP server", "I'm disconnecting, bye :*")🏃♂️
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 | |
| # Example for the Docker Hub V2 API | |
| # Returns all imagas and tags associated with a Docker Hub user account. | |
| # Requires 'jq': https://stedolan.github.io/jq/ | |
| # set username and password | |
| UNAME="" | |
| UPASS="" |
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
| # build stage | |
| FROM golang:alpine AS build-env | |
| ADD . /src | |
| RUN cd /src && go build -o goapp | |
| # final stage | |
| FROM alpine | |
| WORKDIR /app | |
| COPY --from=build-env /src/goapp /app/ | |
| ENTRYPOINT ./goapp |
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
| #!/usr/bin/ruby | |
| # wol.rb: sends out a magic packet to wake up your PC | |
| # | |
| # Copyright (c) 2004 zunda <zunda at freeshell.org> | |
| # Modified by scharfie <scharfie at gmail dot com> | |
| # | |
| # This program is free software. You can re-distribute and/or | |
| # modify this program under the same terms of ruby itself --- | |
| # Ruby Distribution License or GNU General Public License. | |
| # |
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
| require 'mina/git' | |
| set :domain, 'your_domain' | |
| set :deploy_to, 'your_path_on_server' | |
| set :repository, 'your_git' | |
| set :branch, 'master' | |
| set :app_name, 'your_app_name' | |
| set :shared_paths, ['log'] |
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
| ######################################## | |
| # 1. Build nodejs frontend | |
| ######################################## | |
| FROM node:10.9-alpine as build-node | |
| # prepare build dir | |
| RUN mkdir -p /app/assets | |
| WORKDIR /app | |
| # set build ENV |
OlderNewer