Skip to content

Instantly share code, notes, and snippets.

View KROSF's full-sized avatar
🚀
Learning things

Rodrigo Sanabria KROSF

🚀
Learning things
View GitHub Profile
@KROSF
KROSF / chevron-down.svg
Last active August 28, 2021 11:27
Notion Octicons
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@KROSF
KROSF / fix.md
Created March 19, 2021 16:48
Fix LXC tun
nano /etc/init.d/tun
#! /bin/sh
### BEGIN INIT INFO
# Provides:          tun
# Required-Start:    $network
# Required-Stop: $openvpn
@KROSF
KROSF / install.sh
Last active March 17, 2021 18:47
Nginx wildcard
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:ondrej/php
sudo add-apt-repository ppa:ondrej/nginx
sudo apt install nginx php7.4-fpm php7.4-common php7.4-intl php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-soap php7.4-zip php7.4-bcmath -y
@KROSF
KROSF / spain.txt
Last active July 24, 2020 12:11
adguardblock
||atresmediapublicidad.com^
||mssl.fwmrm.net^
@KROSF
KROSF / docker-setup.sh
Created July 21, 2020 13:00
Install docker and docker-compose
#!/usr/bin/env sh
COMPOSE_VERSION=1.26.2
sudo apt update
sudo apt upgrade -y
sudo apt install -y curl
curl -fsSL https://get.docker.com | sudo sh
sudo curl -L "https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
--- common-debian.sh 2020-04-16 13:47:08.000000000 +0200
+++ common.sh 2020-04-16 13:57:17.000000000 +0200
@@ -99,11 +99,15 @@
# Optionally install and configure zsh
if [ "$INSTALL_ZSH" = "true" ]; then
apt-get install -y zsh
- sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
+ curl -fsSL https://starship.rs/install.sh | bash
+ curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
echo "export PATH=\$PATH:\$HOME/.local/bin" | tee -a /root/.zshrc
@KROSF
KROSF / Twig.php
Created April 14, 2020 20:01
Codeigniter 4 && Twig 3
<?php
namespace App\Libraries;
use Twig\Loader\FilesystemLoader;
use Twig\Environment;
use Twig\Extension\DebugExtension;
use Twig\TwigFunction;
class Twig {
@KROSF
KROSF / index.md
Last active March 6, 2020 14:27
Typescript Tips && Tricks

Typescript Tips && Tricks

Recursive Partial

type RecursivePartial<T> = { [P in keyof T]?: RecursivePartial<T[P]> };

Type Guards

@KROSF
KROSF / aciclico.tex
Last active June 6, 2019 18:39
Graphs
\documentclass[preview,border=4mm,convert={density=600,outext=.png}]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}
\begin{scope}[every node/.style={circle,thick,draw}]
\node (A) at (0,0) {0};
\node (B) at (2,2) {1};
\node (C) at (2,-2) {2};
\node (D) at (4,2) {3};

Keybase proof

I hereby claim:

  • I am krosf on github.
  • I am krosf (https://keybase.io/krosf) on keybase.
  • I have a public key ASAN7-1L6duQ2Brg4hXHwTBrBqaGW1eeObG2w8erf3Fn8wo

To claim this, I am signing this object: