Skip to content

Instantly share code, notes, and snippets.

View iksaku's full-sized avatar
🎯
Focusing

Jorge González iksaku

🎯
Focusing
View GitHub Profile

ActualBudget @ Fly.io

Configuration file for deploying ActualBudget Server to Fly.io.

Set up

  1. Create a new volume called actualbudget_data in the same region you want to deploy your application.

That's it! Deploy now :)

@iksaku
iksaku / code-not-prose.mjs
Created September 1, 2022 00:55
Apply 'not-prose' class to pre tags rendered with Astro + Shiki
import { visit } from 'unist-util-visit'
export default () => (tree, file) => {
visit(tree, 'element', (node) => {
if (! ('tagName' in node) || node.tagName !== 'pre') {
return;
}
node.properties.className.push('not-prose')
})
@iksaku
iksaku / Sortable.php
Created September 19, 2020 18:31
A helper trait that provides basic PHP compatibility with @livewire's Sortable package
<?php
trait Sortable
{
/**
* This function receives a $newOrder array parameter, which contains the order in which
* we should sort our items after being dragged in the UI. The format of the $newOrder is:
*
* [
* newIndex => [
@iksaku
iksaku / Searchable.php
Last active April 4, 2023 01:36
Simple trait that adds basic search funcionality to Laravel Models.
<?php
namespace App\Traits;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Arr;
trait Searchable
{
/**
@iksaku
iksaku / ge-its-rankings.md
Last active May 31, 2020 02:11
Tabla de puntuación de Juegos de GE-ITS

Pinturillo v1 (Logos Computacionales)

Posición Nombre Puntos
1 Jorge González 33
2 Christopher Peña 28
3 Jalil Romero 4 ½
4 Rodolfo Navarro 1
5 Rolando Balboa 1
@iksaku
iksaku / Pretender.php
Last active July 23, 2022 13:59
Pretender Middleware for Laravel apps that rely heavily on JS frameworks
<?php
namespace App\Http\Middleware;
use Cache;
use Closure;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\RequestOptions;
use Illuminate\Http\Request;
#!/bin/bash
# Add Microsoft's APT Repository
curl -s https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo bash -c "curl -s https://packages.microsoft.com/config/ubuntu/18.04/prod.list > /etc/apt/sources.list.d/mssql-release.list"
# Get the packages
sudo apt update
sudo ACCEPT_EULA=Y apt -y install msodbcsql17 mssql-tools
sudo apt -y install unixodbc-dev
@iksaku
iksaku / wpa_supplicant.conf
Created February 5, 2019 03:19
Raspberry Pi's Wi-Fi settings template for headless setup
ctrl_interface=DIR=/var/run/wpa_supplicant
update_config=1
network={
ssid="<SSID Goes Here>"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="<Password Goes Here>"
@iksaku
iksaku / Matrices.cpp
Last active December 1, 2017 03:19
Pequeño script para crear matrices e imprimir varios de sus valores.
#include <iostream>
using namespace std;
int main() {
int numeros[999][999];
int filas, columnas;
int i, j;
int x;
@iksaku
iksaku / RUMA.py
Created November 14, 2017 17:58
Pythonista script for recursive summatory of consecutive numbers
import console
def tryInput(prompt=None):
value = input(prompt)
try:
if int(value) <= 0:
raise ValueError
return int(value)
except ValueError:
print('Numbers should be integers, and here must be higher than Zero...')