Skip to content

Instantly share code, notes, and snippets.

View xewl's full-sized avatar
👾
Working the future

Ken Verhaegen xewl

👾
Working the future
View GitHub Profile
@mberman84
mberman84 / main.py
Created November 10, 2023 16:17
OpenChat Code
import requests
import json
import gradio as gr
url = "http://localhost:11434/api/generate"
headers = {
'Content-Type': 'application/json',
}
@WillianTomaz
WillianTomaz / wsl2-with-1password-info.md
Last active April 29, 2024 15:26
Instructions for using 1Password SSH Agent with WSL2 (on Windows 11)

Saturday, April 22, 2023

How to Use 1Password SSH Agent with WSL2 (on Windows 11)

  • Note:

    • Always look for the official documentation, this tutorial may not suit you as there are new updates to the installation process.
    • References are at the end of the document.
  • Was used:

    • Windows 11 (x64)
    • WSL 2 (Ubuntu 22.04.2 LTS)

Intro

The other day, someone posted a little guide here for hosting a ATM8 server on a headless Linux machine. /u/AlexHailstone noted that Docker could work for this as well and would be nice, and I so happen to have ran my Minecraft servers in Docker containers for years now. So here is a little guide for you guys. This is not a Docker starter guide, you'll need to google around a bit for that if you're not familiar with Docker, but it shouldn't be too difficult.

(Just to cover my ass, I'm not responsible for any loss of (save)data or other risks you may open yourself up to by reading and using this little guide. Please make sure you understand what you're doing by running this. There shouldn't be any problems but if there are, I can't be held responsible!)

Let's get started!

@coryhouse
coryhouse / AllComponents.test.ts
Created May 25, 2022 19:02
Enforce tests exist for each component
// This file assures that a Jest test file and Cypress test file exists for each component.
import path from "path";
import fs from "fs";
function getFiles(filepath: string) {
return fs.readdirSync(filepath).filter(function (file) {
return fs.statSync(path.join(filepath, file)).isFile();
});
}
To install Docker on Debian as root:
1) apt-get update
2) apt-get install ca-certificates curl gnupg lsb-release
3) curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
4) echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
5) apt-get update
6) apt-get install docker-ce docker-ce-cli containerd.io
@ksassnowski
ksassnowski / useDatepicker.ts
Created January 15, 2022 16:09
Datepicker Framework, I guess
import {computed, ref} from "vue";
import {
addMonths, addYears,
eachDayOfInterval,
endOfISOWeek,
getYear,
getDate,
isSameMonth,
startOfISOWeek,
startOfMonth,
@miguelmota
miguelmota / config
Last active April 29, 2024 04:57
Arch linux VNC server setup
session=lxqt
geometry=1920x1080
localhost # comment this out to allow connections from anywhere
alwaysshared
@samselikoff
samselikoff / next.config.js
Last active May 6, 2021 14:18
withProse remark plugin that escapes `prose` for MDX components
let { withProse } = require("./src/remark/withProse");
let { withSyntaxHighlighting } = require("./src/remark/withSyntaxHighlighting");
let { withTableOfContents } = require("./src/remark/withTableOfContents");
let { withExamples } = require("./src/remark/withExamples");
let { withLayout } = require("./src/remark/withLayout");
let { withNextLinks } = require("./src/remark/withNextLinks");
let { VueLoaderPlugin } = require("vue-loader");
let path = require("path");
const withMDX = require("@next/mdx")({
@gwleuverink
gwleuverink / progress-bar.blade.php
Last active April 9, 2024 10:31
Progress bar blade component
@props([
'percentage' => 0,
'failed' => false
])
@php
$done = $failed || $percentage == 100;
@endphp
<div {{ $attributes->merge(['class' => ' space-y-1'])->whereDoesntStartWith('wire:poll') }}
@elijahcruz12
elijahcruz12 / sail-aliases
Last active April 9, 2024 20:22
Laravel Sail Aliases
alias sail='bash vendor/bin/sail'
alias sdown='bash vendor/bin/sail down'
alias sa='bash vendor/bin/sail artisan'
alias sup='bash vendor/bin/sail up -d'
alias sdown='bash vendor/bin/sail down'
alias snpm='bash vendor/bin/sail npm'
alias sdev='bash vendor/bin/sail npm run development'
alias sprod='bash vendor/bin/sail npm run production'
alias snpmi='bash vendor/bin/sail npm install'
alias snpmu='bash vendor/bin/sail npm update'