Skip to content

Instantly share code, notes, and snippets.

View yolabingo's full-sized avatar

Todd Jacobsen yolabingo

  • New Mexico, USA
View GitHub Profile
@yolabingo
yolabingo / python_links.md
Last active April 11, 2024 20:20
python ftw
@yolabingo
yolabingo / xcode.md
Created October 13, 2022 17:48
xcode bullshit
@yolabingo
yolabingo / gist:afaf95b6ec24d1ecc2bc4efdb9c8adc5
Created October 18, 2022 02:24
quick and dirty react graphql
'use strict';
var query = `query PageRender { page(url: "/index") { url friendlyName } }`;
const e = React.createElement;
class EmptyElement extends React.Component {
constructor(props) {
super(props);
}
render() {
fetch('https://demo.dotcms.com/api/v1/graphql', {
method: 'POST',
@yolabingo
yolabingo / macports.sh
Created March 15, 2023 02:26
macports housekeeping
port selfupdate && port upgrade outdated && port uninstall inactive && port uninstall leaves
DO $$ DECLARE
r RECORD;
BEGIN
-- if the schema you operate on is not "current", you will want to
-- replace current_schema() in query with 'schematodeletetablesfrom'
-- *and* update the generate 'DROP...' accordingly.
FOR r IN (SELECT tablename FROM pg_tables WHERE schemaname = current_schema()) LOOP
EXECUTE 'DROP TABLE IF EXISTS ' || quote_ident(r.tablename) || ' CASCADE';
END LOOP;
END $$;
@yolabingo
yolabingo / gist:f5e08e6a6d14940b82597a0dd98cb65c
Last active July 7, 2023 21:01
CentOS 9 docker rootless prereqs

Save the following as docker-prereqs.sh and run as root or with sudo:

#!/bin/bash
DOCKER_USER=dotcms-docker

dnf install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf update -y
dnf install -y iptables tar fuse-overlayfs jq