print "Hello HackerRank!!"
How to get auto-deploy working from Gitlab to your Digital Ocean (DO) server.
Install https://github.com/olipo186/Git-Auto-Deploy (via apt-get):
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:olipo186/git-auto-deploy
sudo apt-get update
sudo apt-get install git-auto-deploy
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
/* Using a JavaScript proxy for a super low code REST client */ | |
// via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg | |
// also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3 | |
const createApi = (url) => { | |
return new Proxy({}, { | |
get(target, key) { | |
return async function(id = "") { | |
const response = await fetch(`${url}/${key}/${id}`) | |
if (response.ok) { | |
return response.json(); |
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
# frozen_string_literal: true | |
require 'uri' | |
require 'net/http' | |
require 'openssl' | |
require 'json' | |
class EasyBrokerApi | |
BASE_URL = 'https://api.stagingeb.com/v1' |
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
<div x-data="{ open: false, filter: '', selected: <%= @options.select { |option| @form.object.send(@field).any?(option[1]) } %>, options: <%= @options %> }" class="flex flex-col"> | |
<div class="flex flex-row justify-between"> | |
<label for="<%= @field %>"> | |
<%= @label %> | |
</label> | |
<button type="button" class="link text-sm" @click="selected = []"> | |
Clear <%= @label.downcase %> | |
</button> | |
</div> |