Skip to content

Instantly share code, notes, and snippets.

View Hebilicious's full-sized avatar
🖤

Heb Hebilicious

🖤
View GitHub Profile
#!/bin/bash
# Change the date under CUTOFF_DATE to change how far back you want to delete
# Install the GitHub CLI tool by following the instructions in the official documentation: https://cli.github.com/manual/installation
# Make sure you auth first to github with 'gh auth login'
REPO_OWNER="OWNER"
REPO_NAME="REPO_NAME"
CUTOFF_DATE=$(date --date='30 days ago' +'%Y-%m-%dT%H:%M:%SZ')
PAGE=1
@mheffner
mheffner / fly.toml
Last active September 24, 2023 14:50
Running a Mastodon server on Fly.io (plus some stuff)
app = "mastiff"
primary_region = "iad"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[build]
image = "tootsuite/mastodon:v3.5.5"

ask CLI

ask is a little CLI I made to interact with OpenAI's GPT-3 (text-davinci-002) from my shell/terminal. The instruction fine-tuning on that model makes it particularly ideal for just asking questions and making requests.

With this CLI, I can do something like:

$ ask 'Write a haskell function that reverses a string'
reverseString :: String -> String
reverseString = foldl (\acc x -> x : acc) []
@PabloSzx
PabloSzx / test-esm.mjs
Created August 12, 2021 16:45
Quick test Node.js ESM
// Using:
// globby@11.0.4
// chalk@4.1.2
import globby from 'globby';
import { dirname } from 'path';
import { fileURLToPath } from 'url';
import chalk from 'chalk';
async function main() {
@dnburgess
dnburgess / gist:e00fc05a567f278828ff72b3e35ed3cc
Last active October 17, 2023 16:36
DB Tech Media Server Setup
---
version: "2"
services:
emby:
image: linuxserver/emby
container_name: emby
environment:
- PUID=998
- PGID=100
- TZ=America/Denver
@cajames
cajames / fargate-efs-cdk-stack.ts
Last active July 26, 2023 08:40
Sample Fargate + EFS CDK Stack. Written up here: https://caj.ms/writing/aws-fargate-with-efs
import cdk = require("@aws-cdk/core");
import { Vpc, Port } from "@aws-cdk/aws-ec2";
import {
Cluster,
ContainerImage,
AwsLogDriver,
FargatePlatformVersion,
NetworkMode,
CfnService,
} from "@aws-cdk/aws-ecs";
@wtbarnes
wtbarnes / push-to-someone-elses-pr.md
Created March 5, 2020 04:49
Brief instructions for how to modify and push to someone else's PR on github

How to Push to Someone Else's Pull Request

Let's say contributor has submitted a pull request to your (author) project (repo). They have made changes on their branch feature and have proposed to merge this into origin/master, where

origin -> https://github.com/author/repo.git

Now say you would like to make commits to their PR and push those changes. First, add their fork as a remote called

@Akryum
Akryum / vue.config.js
Last active April 26, 2020 14:18
Auto-import styles with vue-cli 3
const path = require('path')
module.exports = {
chainWebpack: config => {
const types = ['vue-modules', 'vue', 'normal-modules', 'normal']
types.forEach(type => addStyleResource(config.module.rule('stylus').oneOf(type)))
},
}
function addStyleResource (rule) {
@Hebilicious
Hebilicious / demo.js
Created January 22, 2018 00:51
ES Class constructor spread operator arguments
//Let's create some arguments as functions
let message = () => "hello"
let content = () => "world"
let text = () => "lorem"
//Let's change the function internal name value...
Object.defineProperty(text, "name", {writable:true});
text.name = "book"
//Now we create a class