Skip to content

Instantly share code, notes, and snippets.

View dnsmichi's full-sized avatar
🦊
GitLab

Michael Friedrich dnsmichi

🦊
GitLab
View GitHub Profile
@ivanfioravanti
ivanfioravanti / gist:bcacc48ef68b02e9b7a4034161824287
Created January 25, 2024 00:01
Fine tuning dataset generation wiht Ollama python library
import json
import os
import ollama
def query_ollama(prompt, model='openhermes:7b-mistral-v2.5-q6_K', context=''):
response = ollama.generate(
model=model,
prompt=context + prompt)
return response['response'].strip()
@azet
azet / Datacenter-Operations__here_be_dragons.md
Last active January 30, 2024 18:25
Reading material for Operations & Datacenter engineers and managers

Check Out these projects, papers and blog posts if you're working on Geo redundant Datacenters or even if you only need to have your software hosted there. It's good to know what you're in for.

  Collected these for a colleague, these have been super useful over 
  the past 15+ years and and will most likely help and/or entertain you. 
  May be extended in the future.
  -- azet (@azet.org)

load balancing

DNS geo & anycast

@devonzuegel
devonzuegel / close-zoom-tab-on-success.js
Last active November 13, 2021 19:49
Close Zoom tab on success — TamperMonkey
/* This has moved to:
* https://github.com/devonzuegel/digital-nesting/blob/master/zoom/zoom.js
*/
@lazyfrosch
lazyfrosch / git-filter-secrets
Last active January 8, 2020 12:54
An example how to filter secrets from git commits
#!/bin/bash
set -e
case "$1" in
init)
git config filter.git-filter-secrets.smudge "git-filter-secrets smudge"
git config filter.git-filter-secrets.clean "git-filter-secrets clean"
git config filter.git-filter-secrets.required true
echo "Configuration updated"
@IanColdwater
IanColdwater / twittermute.txt
Last active March 6, 2024 18:49
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@swyxio
swyxio / cities.js
Last active September 16, 2019 21:18
threejs boilerplate
let renderer, camera, controls, scene,
width = window.innerWidth,
height = window.innerHeight;
init();
animate();
addShapes();
render();
function addShapes() {
@skyzyx
skyzyx / homebrew-gnubin.md
Last active March 18, 2024 06:45
Using GNU command line tools in macOS instead of FreeBSD tools

macOS is a Unix, and not built on Linux.

I think most of us realize that macOS isn't a Linux OS, but what that also means is that instead of shipping with the GNU flavor of command line tools, it ships with the FreeBSD flavor. As such, writing shell scripts which can work across both platforms can sometimes be challenging.

Homebrew

Homebrew can be used to install the GNU versions of tools onto your Mac, but they are all prefixed with "g" by default.

All commands have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH from your bashrc.

@waja
waja / README.md
Last active December 15, 2021 10:54
Migration from Debian Stretch to Buster
@jmb
jmb / README.md
Last active January 27, 2019 22:25
MQTT Data Subscriber for Dashing

Description

Dashing job to subscribe to MQTT messages.

MQTT is a lightweight publish/subscribe messaging transport. This job allows Dashing to subscribe to these messages and send them as events. There is no associated widget as the data can take any form - commonly numbers, but not necessarily. The script as laid out below sends events with value, current (the same contents) and last values so can be plugged directly into the Numbers or Meter widgets using the data-id in the dashboard file. The send_event could easily be modified if required.

Set up

Add to Gemfile: