-
Open the ChatGPT Codex task setup panel. This is where you configure your environment before starting a task.
-
Locate the "Setup Script" field. You’ll see a note that internet access is disabled after the script runs.
This file contains hidden or 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
import zipfile | |
from lxml import etree | |
import argparse | |
def process_element(elem, namespaces): | |
w = namespaces['w'] | |
tag = elem.tag | |
if tag == f'{{{w}}}ins': | |
author = elem.attrib.get(f'{{{w}}}author', 'Unknown') | |
content = ''.join(process_element(child, namespaces) for child in elem) |
This file contains hidden or 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/bash | |
set -e | |
usage() { | |
echo "Usage: $0 [-k <ssh-key> ] [-r <region>] instance_id" 1>&2 | |
echo "Connect to Ec2-instance serial-console via ssh" 1>&2 | |
echo "Options:" 1>&2 | |
echo " -k ssh-key path to key uploaded to amazon for ssh-access OR" 1>&2 | |
echo " name of key "my_key" will use ~/.ssh/my_key.pub" 1>&2 | |
echo " -r region AWS region of instance, eu-west-1" 1>&2 |
This file contains hidden or 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
#!python3 | |
def calculate_min_initial_cost(loan, rate, inflation, years): | |
if rate == inflation: | |
return (loan * (1-rate))/years | |
else: | |
return ( | |
(loan * (rate - inflation)) | |
/ | |
( |
This file contains hidden or 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
# Set default state for services getting installed. | |
# Disable all services by default | |
disable * | |
# But if the service getting installed is ssh - enable it | |
enable ssh.service |
This file contains hidden or 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
[gcode_macro M107] | |
description: Override M107 - Call M106 S0 so we wait for fan to spin-down. | |
rename_existing: G99321321 | |
gcode: | |
M106 S0 | |
[gcode_macro M106] | |
description: Overide M106 with a macro which sets speed, calculates a target range then within 100ms pauses print and waits for fan to spool up / down if spead hasn't been reached. | |
rename_existing: G99123123 |
This file contains hidden or 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
[gcode_macro M106] | |
description: Overide M106 with a macro which waits for fan to spool up / down. | |
variable_fan_rpm_extra_diff: 1000 | |
rename_existing: G99123123 | |
gcode: | |
{% set speed = params.S | default(255) | int %} | |
# From google sheets: https://docs.google.com/spreadsheets/d/1sft29z37njtjudYw_bwkCwU5Mn8ZIfSqpJF49LV38YE | |
# Formula: -6634 + 260x + -0.829x^2 + 1.23E-03x^3 | |
{% set target_rpm = -6634 + 260 * speed + -0.829 * (speed **2) + 0.00123 * (speed ** 3) %} | |
# Clamp to minimum of 0. |
This file contains hidden or 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
package main | |
import ( | |
"flag" | |
"fmt" | |
"github.com/coreos/go-systemd/sdjournal" | |
"io/ioutil" | |
"log" | |
"regexp" | |
"time" |
This file contains hidden or 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
10:12:27 WARNING: WebEngine compiled with X11 support, however qpa backend is not xcb. This may fail. | |
[0206/101227.198997:WARNING:stack_trace_posix.cc(699)] Failed to open file: /home/oskar/#18746720 (deleted) | |
Error: No such file or directory | |
10:12:27 WARNING: Wayland does not support QWindow::requestActivate() | |
[16036:16056:0206/101227.977089:ERROR:nss_ocsp.cc(614)] No URLRequestContext for NSS HTTP handler. host: ocsp.digicert.com | |
[16036:16056:0206/101227.977118:ERROR:nss_ocsp.cc(614)] No URLRequestContext for NSS HTTP handler. host: ocsp.digicert.com | |
[16036:16056:0206/101227.978273:ERROR:nss_ocsp.cc(614)] No URLRequestContext for NSS HTTP handler. host: crl3.digicert.com | |
[16036:16056:0206/101227.979272:ERROR:nss_ocsp.cc(614)] No URLRequestContext for NSS HTTP handler. host: ocsp.digicert.com | |
[16036:16056:0206/101227.979291:ERROR:nss_ocsp.cc(614)] No URLRequestContext for NSS HTTP handler. host: ocsp.digicert.com | |
[16036:16056:0206/101227.979343:ERROR:nss_ocsp.cc(614)] No URLRequestContext for NSS HTTP hand |
This file contains hidden or 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
#docker run -i -t -v $(pwd)/:/mnt ubuntu:xenial /bin/bash | |
# Add deb-src to apt | |
#sed -i 's/^# deb-src/deb-src/g' /etc/apt/sources.list | |
#apt-get update | |
# Grab build-dependencies | |
#apt-get install dpkg-dev git devscripts quilt | |
#apt-get build-dep nginx | |
# Grab nginx-source | |
apt-get source nginx | |
cd nginx-* |
NewerOlder