Install depedent packages via Brew (one-time setup)
$ brew install socat
$ brew cask install xquartzSetup XQuartz
| # helper function to embed Elm applications | |
| # This does not support defining ports | |
| module ElmHelper | |
| def elm(element_id, elm_app, **flags) | |
| tag.div('', data: { turbo: 'false' }) do | |
| add_elm_global_flags + | |
| tag.div('', id: element_id) + | |
| embed_elm_app(element_id, elm_app, **flags).html_safe | |
| end | |
| end |
| #!/bin/bash | |
| # This bash script outputs the status of your Pi and checks whether you are being throttled for undervoltage and gives you your temperature | |
| # Article and discussion at https://jamesachambers.com/measure-raspberry-pi-undervoltage-true-clock-speeds/ | |
| # Author James A Chambers 6-6-17 | |
| # updated throttle reason codes by tmuka 2021-10 | |
| # Output current configuration | |
| vcgencmd get_config int | egrep "(arm|core|gpu|sdram)_freq|over_volt" | |
| # Measure clock speeds |
| // DONT FORGET TO `yarn add esbuild-loader` !!! | |
| // config/webpacker/environment.js | |
| const { environment } = require('@rails/webpacker') | |
| const { ESBuildPlugin } = require('esbuild-loader') | |
| const esBuildUse = [ | |
| { | |
| loader: require.resolve('esbuild-loader'), | |
| // What you want to compile to, in this case, ES7 |
rails g active_admin:install --use_webpackerbin/rails action_text:installrequire("trix")
require("@rails/actiontext")| FROM alpine:3.9 as builder | |
| ENV VERSION=v12.16.2 NPM_VERSION=6 YARN_VERSION=latest | |
| LABEL maintainer="Thiago Zilli Sarmento <thiago.zilli@gmail.com>" | |
| LABEL builder="builder" | |
| RUN apk upgrade --no-cache -U && \ | |
| apk add --no-cache \ | |
| ca-certificates \ |
| <script src="https://js.stripe.com/v3/"></script> |
| CREATE SEQUENCE public.global_id_seq; | |
| ALTER SEQUENCE public.global_id_seq OWNER TO postgres; | |
| CREATE OR REPLACE FUNCTION public.id_generator() | |
| RETURNS bigint | |
| LANGUAGE 'plpgsql' | |
| AS $BODY$ | |
| DECLARE | |
| our_epoch bigint := 1314220021721; | |
| seq_id bigint; |
| variables: | |
| DOKKU_HOST: 'dokku.host.es' | |
| IP_DOKKU_HOST: '1.2.3.4' | |
| SSH_DOKKU_PORT: '22' | |
| PROJECT_NAME: 'project_name' | |
| stages: | |
| - deploy_to_dokku | |
| deploy_dokku: |
| #! /usr/local/bin/ruby | |
| #********************************************* | |
| # シンプソン則による定積分 | |
| #********************************************* | |
| class DefiniteIntegralSimpson | |
| # 積分区間分割数 | |
| M = 100 | |
| def initialize | |
| # 被積分関数 |