In your SilverStripe project (the original module can be found here):
$ composer require pstaender/silverstripe-serve
Just start now the server with:
def on_chat(): | |
# Teleport agent to player | |
agent.teleport_to_player() | |
# Set up the builder at the agent's position | |
builder.teleport_to(agent.get_position()) | |
for i in range(10, 1, -2): | |
builder.mark() # Mark start |
# usage: bundle exec ruby rename_invoice_pdfs.rb folder/*.pdf | |
require "openai" | |
require "json" | |
require "fileutils" | |
require "shellwords" | |
dry_run = false | |
client = OpenAI::Client.new( |
import { faker } from '@faker-js/faker/locale/de'; | |
import {readFile} from 'node:fs/promises'; | |
// https://fakerjs.dev/api/ | |
let fields = [ | |
[ | |
/email/i, faker.internet.email, | |
], | |
[ | |
/nachname/i, faker.name.lastName, |
In your SilverStripe project (the original module can be found here):
$ composer require pstaender/silverstripe-serve
Just start now the server with:
require 'json' | |
require 'httparty' | |
class HetznerDNS | |
include HTTParty | |
base_uri 'https://dns.hetzner.com' | |
def initialize | |
@options = { | |
headers: { |
require 'digest' | |
require 'json' | |
require 'shellwords' | |
def command?(name) | |
`which #{name}` | |
$?.success? | |
end | |
unless command?('sips') |
# alias cd to modern cd with auto ls | |
alias ls='exa -l --git --header' | |
function cd_and_ls { | |
cd $1 && ls | |
} | |
alias cd=cd_and_ls |
window.highlightText = (element, highlightText, styleOrClass = 'highlight') => { | |
let elements = []; | |
let html = element.innerHTML; | |
let newHTML = []; | |
let style = ''; | |
let klass = ''; | |
if (styleOrClass.includes(':')) { | |
style = styleOrClass; | |
} else { | |
klass = styleOrClass; |
#!/bin/bash | |
sudo apt-get install -y git libcap2-bin | |
echo 'install go lang' | |
wget -q https://storage.googleapis.com/golang/getgo/installer_linux | |
chmod +x installer_linux | |
./installer_linux | |
source ~/.bash_profile |
[Unit] | |
Description=Caddy HTTP/2 web server | |
Documentation=https://caddyserver.com/docs | |
After=network-online.target | |
Wants=network-online.target systemd-networkd-wait-online.service | |
[Service] | |
Restart=on-abnormal | |
; User and group the process will run as. |