This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from torch import nn | |
from sklearn.metrics import r2_score | |
#torch.set_default_device("mps") | |
class MyMachine(nn.Module): | |
def __init__(self): | |
super().__init__() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ollama Model Export Script | |
# Usage: bash ollama-export.sh vicuna:7b | |
# License: MIT (https://ncurl.xyz/s/RD0Yl5fSg) | |
# https://gist.github.com/supersonictw/f6cf5e599377132fe5e180b3d495c553 | |
set -e | |
echo "Ollama Model Export Script" | |
echo "License: MIT (https://ncurl.xyz/s/RD0Yl5fSg)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MIT License | |
Copyright (c) 2024 SuperSonic (https://github.com/supersonictw) | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "code": "aa", "name": "Afar" }, | |
{ "code": "ab", "name": "Abkhazian" }, | |
{ "code": "ae", "name": "Avestan" }, | |
{ "code": "af", "name": "Afrikaans" }, | |
{ "code": "ak", "name": "Akan" }, | |
{ "code": "am", "name": "Amharic" }, | |
{ "code": "an", "name": "Aragonese" }, | |
{ "code": "ar", "name": "Arabic" }, | |
{ "code": "as", "name": "Assamese" }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"zone": "Pacific/Midway", | |
"gmt": "(GMT-11:00)", | |
"name": "Midway Island" | |
}, | |
{ | |
"zone": "US/Samoa", | |
"gmt": "(GMT-11:00)", | |
"name": "Samoa" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cat /dev/urandom | head -n 1 | sha256sum - | cut -d ' ' -f 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# docker-local | |
# License: MIT (https://ncurl.xyz/s/RD0Yl5fSg) | |
# https://gist.github.com/supersonictw/1dc1cc0d74f4578827577a5f30cb7b47 | |
# Usage: | |
# docker-local login example.org | |
# docker-local pull example.org/the_app:latest | |
set -e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Flush Cloudlflare DNS records | |
CF_TOKEN="" | |
ZONE_ID="" | |
QUERY_RECORDS() { | |
curl -s -X GET https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/dns_records?per_page=500 \ | |
-H "Authorization: Bearer ${CF_TOKEN}" \ | |
-H "Content-Type: application/json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Install] | |
WantedBy=multi-user.target | |
[Unit] | |
Description=dynamic-http-tunnel | |
Wants=network-online.target | |
After=network-online.target | |
[Service] | |
Type=simple |
NewerOlder