Skip to content

Instantly share code, notes, and snippets.

View infoslack's full-sized avatar
🏠
Working from home

Daniel Romero infoslack

🏠
Working from home
View GitHub Profile
@Hellisotherpeople
Hellisotherpeople / blog.md
Last active October 30, 2024 08:38
You probably don't know how to do Prompt Engineering, let me educate you.

You probably don't know how to do Prompt Engineering

(This post could also be titled "Features missing from most LLM front-ends that should exist")

Apologies for the snarky title, but there has been a huge amount of discussion around so called "Prompt Engineering" these past few months on all kinds of platforms. Much of it is coming from individuals who are peddling around an awful lot of "Prompting" and very little "Engineering".

Most of these discussions are little more than users finding that writing more creative and complicated prompts can help them solve a task that a more simple prompt was unable to help with. I claim this is not Prompt Engineering. This is not to say that crafting good prompts is not a difficult task, but it does not involve doing any kind of sophisticated modifications to general "template" of a prompt.

Others, who I think do deserve to call themselves "Prompt Engineers" (and an awful lot more than that), have been writing about and utilizing the rich new eco-system

@endolith
endolith / whisper_transcribe.py
Created March 27, 2023 02:33
Transcribe a long audio recording using OpenAI Whisper API
"""
Break up a long recording to fit within the Whisper API's limits, with some
overlap, so no words are missed, and then feed to OpenAI Whisper API to
transcribe it to .txt file. Written by endolith and ChatGPT-4.
"""
import openai
import math
import os
import subprocess
@rikatz
rikatz / eventexporter.yml
Created November 5, 2018 18:21
Kubernetes Events Export with Metricbeat + Logstash
---
apiVersion: v1
kind: ConfigMap
metadata:
name: metricbeat-config
namespace: kube-system
labels:
k8s-app: metricbeat
data:
metricbeat.yml: |-
#!/bin/bash
DOCKER_COMPOSE_FILES='docker-compose1.yml,docker-compose2.yml'
DOCKER_COMPOSE_UP_MODE=1 #1|0
DOCKER_COMPOSE_UP_LOG_FILE='/tmp/log.txt'
DOCKER_COMPOSE_BUILD_OPTIONS="" #any options for `docker-compose build`
DOCKER_COMPOSE_UP_OPTIONS="" #any options for `docker-compose up`
DOCKER_COMPOSE_RUN_OPTIONS="" #any options for `docker-compose run`
TEST_CONTAINERS="application1=/test.sh,application2=/test2.sh"
##### get port remover #####
@Cryptophobia
Cryptophobia / kube-resque-pre-stop.sh
Last active November 9, 2018 22:34
preStop Kubernetes Lifecycle Resque Hook
#!/bin/bash
# This script gracefully stops resque workers by issuing the USR2
# signal to the resque-pool manager and then waits for the workers
# to be paused before exiting. Resque-pool master process relays
# the USR2 signal to the children.
#
# For reference:
# (1) https://github.com/nevans/resque-pool#signals
# (2) https://github.com/resque/resque/blob/master/lib/resque/worker.rb#L376-L378
@ahmetb
ahmetb / gcrgc.sh
Last active October 3, 2024 14:32
Script to clean up Google Container Registry images pushed before a particular date
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@zquestz
zquestz / KubernetesBitcoinConfigs.md
Last active May 20, 2022 02:42
GCE Kubernetes Bitcoin Configs

Bitcoin Kubernetes Configs

The following guide will walk you through creating a bitcoin full node within GKE (Google Container Engine).

By default Bitcoin ABC is used, however this can be swapped for any other node quite easily.

If you wish to run another version of bitcoind, just change the image reference in bitcoin-deployment.yml. There are tons of images available on the Docker Hub. Better yet, build your own. =)

The source for the included image is available at: https://github.com/zquestz/docker-bitcoin

@Integralist
Integralist / 1. linux utilities.md
Last active December 1, 2023 15:04
Different Linux utility commands (e.g. top, ps, strace, lsof, netstat, ifconfig, iftop, iptraf, tcpdump, wireshark)

Start up a container (whichever Linux flavour takes your fancy):

docker run -it ubuntu /bin/bash
docker run -it centos /bin/bash
  • top: check what CPU and Memory running processes are utilising
  • ps: see what processes are running
  • strace: monitor interactions between processes
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active November 2, 2024 06:45
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@awidegreen
awidegreen / vim_cheatsheet.md
Last active October 27, 2024 12:13
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close