Skip to content

Instantly share code, notes, and snippets.

@ZiTAL
ZiTAL / index.py
Last active June 30, 2023 13:15
python: open llama
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# pip3 install
# 3B
# https://huggingface.co/TheBloke/orca_mini_3B-GGML/tree/main
# 7B
# https://huggingface.co/TheBloke/open-llama-7b-open-instruct-GGML/tree/main
@ZiTAL
ZiTAL / sslh.md
Last active October 24, 2023 07:42
sslh: nginx + openvpn + ssh

install

su
apt-get install sslh nginx libcap2-bin
setcap 'cap_net_bind_service=+ep' /usr/sbin/sslh

nano /etc/default/sslh

DAEMON=/usr/sbin/sslh
@ZiTAL
ZiTAL / README.md
Created May 25, 2023 10:18
ASUS RT-AC68U: Izarkom SERCOMM router-a bridge moduan jarri, gure router neutro-a konfiguratzeko gida

ASUS RT-AC68U: Izarkom SERCOMM router-a bridge moduan jarri, gure router neutro-a konfiguratzeko gida

  1. SERCOMM ETH1 sare portua ordenagailura konketatu.
  2. SERCOMM router-aren konfigurazioan sartu: http://192.168.1.1 SERCOMM
  3. Configuración -> LAN Switch -> Modo: Bridge (nivel 2).
  4. Aplicar.
  5. SERCOMM botoia sakatuz reseteatu.
  6. SERCOMM ETH1 portua ASUS-en WAN portura konektatu
  7. ASUS ETH1 ordenagailura konektatu.
@ZiTAL
ZiTAL / sasi-chat-gpt.sh
Last active May 5, 2023 08:06
local-chat-gpt
su
chown -R pi:pi /opt
exit
cd /opt
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
bash Mambaforge-Linux-aarch64.sh
# /opt/mambaforge
su
ln -s /opt/mambaforge/bin/conda /usr/local/bin/conda
@ZiTAL
ZiTAL / index.html
Last active September 10, 2023 12:11
js: videojs hls example
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>videojs-contrib-hls embed</title>
<link href="https://vjs.zencdn.net/8.0.4/video-js.css" rel="stylesheet">
<script src="https://vjs.zencdn.net/8.0.4/video.min.js"></script>
<script src="https://unpkg.com/@videojs/http-streaming@3.2.0/dist/videojs-http-streaming.min.js"></script>
@ZiTAL
ZiTAL / certbot.conf
Created April 12, 2023 10:56
certbot: manual renew certificate
server {
include /etc/nginx/vhost.conf.d/*.conf;
server_name zital.freemyip.com zital-pi.no-ip.org pi4 amule.zital.freemyip.com bermiotarra.zital.freemyip.com blog.zital.freemyip.com clock-canvas-js.zital.freemyip.com downloads.zital.freemyip.com itzultzaile-neuronala.zital.freemyip.com matematika-js.zital.freemyip.com sotapatroi.zital.freemyip.com transmission.zital.freemyip.com vpn.zital.freemyip.com mc.zital.freemyip.com
root /var/www/html;
location / {
allow all;
}
}
@ZiTAL
ZiTAL / Main.php
Last active March 14, 2023 12:01
Laravel: Eloquent connect 2 tables using hasOneThrough
<?php
// We would like to get Destiny's table data, using Main's information and using the intermediate table Intermediate
App;
use Illuminate\Database\Eloquent\Model;
class Main extends Model
{
public function destiny()
{
return $this->hasOneThrough(
@ZiTAL
ZiTAL / sexumatoia.md
Last active December 29, 2022 11:28
Gaztezuloko sexumatoia zentsura barik

zital

Zein da zure film erromantiko gogokoena?

Pertsonak ez dira garrantzitsuak, idealetaz oroitu, pertsonak atxilotu, erahil eta ahaztu ahal direlako, baina idealek 400 urte geroago ere mundua alda dezakete. “V for Vendetta”

V for Vendetta

Eta noizbait bero-bero jarri zaituen telesaila?

@ZiTAL
ZiTAL / example.sh
Created December 20, 2022 11:53
pandoc: custom page size
#!/bin/bash
pandoc -i b.html -V geometry:papersize="{16cm,21cm}" -o b.pdf
@ZiTAL
ZiTAL / example.sh
Created November 25, 2022 11:48
mail: fish vs bash
# bash style:
/usr/bin/mail -s "Title" -r sender@sender.com receptor@receptor.com <<< "BODY"
# fish and bash:
echo "Body" | /usr/bin/mail -s "Title" -r sender@sender.com receptor@receptor.com