Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
random_string() {
< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32}; echo;
}
: ${TABLE_PREFIX=wp_}
cat > /var/www/html/wp-config.php <<EOF
<?php
define('DB_NAME', '$MYSQL_ENV_MYSQL_DATABASE');
define('DB_USER', '$MYSQL_ENV_MYSQL_USER');
define('DB_PASSWORD', '$MYSQL_ENV_MYSQL_PASSWORD');
@hirowatari
hirowatari / Dockerfile
Last active September 18, 2022 05:32
Rails, docker, selenium
# rails/Dockerfile
FROM ubuntu:18.04
ARG GROUP_ID=1000
ARG USER_ID=1000
ARG USER=rails_user
ENV DEBIAN_FRONTEND noninteractive
ENV BUNDLER_VERSION 2.0.2
ENV RUBY_VERSION 2.6.4
Stripe::Invoice.upcoming(customer: stripe_subscription.customer,
subscription: stripe_subscription.id,
subscription_cancel_now: true)
.period_end
# previously period_end was the date the period would end if the subscription was not canceled
# this changed to return present time.
function loadMapboxGl() {
/**
* Load MapBox Assets
* we either need to load mapbox with requirejs if our customer is using it
* or we need to load it ourselves.
*
* If we wait write out a script tag that loads it well...HERE BE DRAGONS.
* requirejs could load before mapbox. In this case mapbox will not work and requirejs will not load it. This is the worst case.
* At times this will load mapbox even when requirejs will exist later,
* but this should work since it should be loaded before requirejs.
curl -v -H "Authorization: Bearer REMOVED" 'https://api-proxy.pipedrive.com/v1/permissionSets/b9fd89e0-fb6d-11eb-9236-7d6a28019310'
* Trying 104.18.188.228:443...
* Connected to api-proxy.pipedrive.com (104.18.188.228) port 443
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: none
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):