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
server { | |
listen 443; | |
listen 80; | |
server_name tracking.domain.com; | |
add_header Strict-Transport-Security max-age=63072000; | |
#client_max_body_size 200M; | |
# Security features | |
if ($http_user_agent ~* LWP::Simple|BBBike|wget) { |
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
// Available variables: | |
// Machine (machine factory function) | |
// assign (action) | |
// XState (all XState exports) | |
const fetchMachine = Machine({ | |
id: 'Point of Sale', | |
context: { attempts: 0 }, | |
initial: 'idle', |
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
const fetchMachine = Machine({ | |
id: 'Point of Sale', | |
initial: 'place order', | |
context: { | |
retries: 0 | |
}, | |
states: { | |
'place order': { | |
on: { | |
'unpack qr': 'qrcode' |
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
#!/bin/sh | |
# create docker engine config at /etc/docker/daemon.json | |
# to limit the size of container logs. | |
# usage (with curl): | |
# curl -s https://gist.githubusercontent.com/wzulfikar/e7740906110beaa90216f8f37320f5d8/raw/docker-daemon-log-opts.sh | sh | |
config_dir="/etc/docker" | |
config_file="$config_dir/daemon.json" | |
max_size=50m |
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
#!/bin/sh | |
# Download and run the script (tested on Ubuntu 20): | |
# curl -s https://raw.githubusercontent.com/wzulfikar/lab/master/bash/setup-obs-ubuntu.sh | sh | |
# | |
# Read notes about the script: | |
# https://www.notion.so/Setup-OBS-in-Ubuntu-for-24-7-YouTube-Live-Streaming-5949000d598b480aa422657d54ca7da4 | |
# | |
# Once installed, you can access OBS using vnc client on port 6701. |
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
#!/bin/sh | |
# File: /opt/nginx-proxy/run.sh | |
# If you are on ubuntu and have docker installed, you can automate the setup by running below command. | |
# Make sure to adjust the DEFAULT_EMAIL and WORKDIR according to your need. The command: | |
: ' | |
export DEFAULT_EMAIL=myemail@mydomain.com WORKDIR=/opt/nginx-proxy && \ | |
sudo mkdir ${WORKDIR} && \ | |
curl -o /tmp/nginx-proxy.sh https://gist.githubusercontent.com/wzulfikar/957917c8ad84a6047bdb0831215daa51/raw/cf7acfe4fecbcd2cd9acf83ef0382cfc03fbbc63/run.sh && \ |
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
#!/bin/sh | |
# File: /opt/wordpress/run.sh | |
APP_NAME=acme-blog | |
WORKDIR=/opt/wordpress | |
if [ ! -f "uploads.ini" ]; then | |
touch ${WORKDIR}/uploads.ini | |
fi |
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
pipeline: | |
build: | |
image: alpine | |
commands: | |
- echo "do something :v" | |
slack: | |
image: plugins/slack | |
channel: dev__builds | |
webhook: https://hooks.slack.com/services/... | |
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
# Run `gem install active_record sqlite3` to install the dependencies | |
ENV['DATABASE_URL'] = 'sqlite3:/tmp/sqlite.test' # Change this to anything you want | |
require 'sqlite3' # Make sure to require the correct adapter for your `DATABASE_URL` | |
require 'active_record' | |
ActiveRecord::Base.establish_connection | |
ActiveRecord::Schema.define do |
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
Hello world from Tira! |