go run ./fill.go "features=[\"feature1\"]"
Output:
{
class Supercooling { | |
static def delta(Integer temperature, BigDecimal slope, BigDecimal intercept) { | |
return slope * temperature + intercept | |
} | |
static def coolingTime(ArrayList<Integer> morningForecast, coolingRequired, coolSlope, coolIntercept) { | |
def coolingAmount = 0 | |
def time = 0 | |
def hour = 0 | |
while (coolingAmount < coolingRequired) { |
#!/bin/bash | |
# MacOS: Install latest OpenSSH | |
brew install openssh | |
# Generate new keypair | |
ssh-keygen -t ecdsa-sk | |
# Your key pair will be in ~/.ssh/id_ecdsa_sk and can be used as normal ssh key so id_ecdsa_sk.pub can be copied to your servers authorized_keys file |
# config/initializers/active_admin.rb | |
# ...rest of the initializer here... | |
module AdminPageLayoutOverride | |
def build(*args) | |
# you can move the call to super at the end, if you wish | |
# to insert things at the begining of the page | |
super |
module GraphQL | |
module PunditIntegration | |
module BaseIntegration | |
def self.included(child) | |
child.extend ClassMethods | |
end | |
module ClassMethods | |
def policy_class |
GP_HOST=https://user:[email protected] | |
OUTPUT_DIR=/home/richard/public_html/plants | |
VIDEO_FILE=$OUTPUT_DIR/video/video.mp4 | |
# take picture | |
curl -s $GP_HOST/gp/gpControl/command/shutter?p=1 | |
sleep 5 | |
# download picture | |
IMAGE_FILE=`curl -s $GP_HOST/gp/gpMediaList | sed -r "s/.*(GOPR[0-9]+\.JPG).*/\1/"` |
# 1) Create your private key (any password will do, we remove it below) | |
$ cd ~/.ssh | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |
# This is an example of the kind of things you can do in a configuration file. | |
# All flags used by the client can be configured here. Run Let's Encrypt with | |
# "--help" to learn more about the available options. | |
# Use a 4096 bit RSA key instead of 2048 | |
rsa-key-size = 4096 | |
# Always use the staging/testing server | |
# server = https://acme-staging.api.letsencrypt.org/directory |
class ApplicationController < ActionController::Base | |
# Prevent CSRF attacks by raising an exception. | |
# For APIs, you may want to use :null_session instead. | |
protect_from_forgery with: :exception | |
protected | |
def current_user | |
@current_user ||= session[:user_id] and User.find(session[:user_id]['$oid']) | |
end |