Skip to content

Instantly share code, notes, and snippets.

View clsource's full-sized avatar
💻
🥷🏼

Camilo clsource

💻
🥷🏼
View GitHub Profile
@clsource
clsource / phoenix-for-laravel.md
Last active July 7, 2026 20:51
A phoenix framework for laravel devs

Phoenix for Laravel Devs

Init a project

Laravel has sqlite3 as the default database driver. And you can use dashes inside the directory.

Laravel

$ laravel new my-project
@clsource
clsource / README.md
Created June 29, 2026 23:03
Instalar PHP con mise

Se usa https://github.com/verzly/mise-php

# Install the plugin
# NOTE: If you are not contributing and want to use stable releases, always use the `#latest` suffix to avoid tracking the development branch.
mise plugin install php https://github.com/verzly/mise-php#latest

# First install
mise use -g php@latest
@clsource
clsource / GH-MarkasRead.md
Created October 26, 2025 18:05
Github Notifications Mark All as Read

From an interaction with Github Support regarding phantom notifications (ones that I could not mark as read).

Using gh cli. Running the script to mark notifications as "read" is generally considered safe, as it does not remove the notification itself, only updates the status of the notification. Here is the script:

gh api \
  --method PUT \
 -H "Accept: application/vnd.github+json" \
@clsource
clsource / discord-update.sh
Created February 15, 2025 11:39
Debian 12 Discord Updater Script
#!/usr/bin/bashs
# Save it in /usr/local/bin/discord-update
# And chmod +x /usr/local/bin/discord-update
# Run it when discord ask for updates
# URL to check for the latest Discord version for Linux in .deb format
update_url="https://discord.com/api/download?platform=linux&format=deb"
# Get the actual download URL which contains the version number
download_url=$(curl -w "%{url_effective}" -ILSs "$update_url" -o /dev/null)
@clsource
clsource / Challenge.md
Last active November 10, 2024 00:04
Error Handling Challenge

Bank Account Error Challenge

https://rm4n0s.github.io/posts/3-error-handling-challenge/

The challenge is simple to understand. Print a message to the user based on the path of function calls that produced the error, and not based on the error itself.

print three different messages based on

@clsource
clsource / update.php
Created March 2, 2024 17:26
Fetch Website from Github
<?php
/*
* This function copy $source directory and all files
* and sub directories to $destination folder
* https://gist.github.com/gserrano/4c9648ec9eb293b9377b
*/
function recursive_copy($src,$dst) {
$dir = opendir($src);
@clsource
clsource / msys2-shortcut.md
Created February 17, 2024 10:39 — forked from hollowmaster1496/msys2-shortcut.md
Open MSYS2 terminal here (mingw-w64) from right-click menu

For anyone who develops software on Windows (but needs quick access to a Linux terminal), here's a quick and easy way to get it with MSYS2.

Before starting, install "MSYS2" with default settings.

  1. From Windows search, launch 'regedit.exe'
  2. Navigate to "HKEY_CLASSES_ROOT\Directory\Background\shell"
  3. Right-click on 'shell' and select New>Key. Call this key MSYS2.
  4. Now right-click on 'MSYS2' and select New>Key. Call this key command
  5. Select command and then double-click on (Default). Set 'Value data' to "C:\msys64\msys2_shell.cmd" "-here"
@clsource
clsource / timer.go
Last active February 2, 2024 14:59
Go Exercise: Create a 5 minute Timer that displays the current remaining time in terminal
package main
import (
"fmt"
"sync/atomic"
"time"
)
type SecondsCounter struct {
count int32
@clsource
clsource / piu.phoenix.js
Last active December 26, 2023 18:10
Export Gameplay data from PIU Phoenix Website to CSV (Using TamperMonkey)
// ==UserScript==
// @name PIU.Phoenix.PlayData
// @namespace https://ninjas.cl
// @version 2023-12-25
// @description Save data from Phoenix Gameplays to local csv
// @author Camilo Castro <clsource>
// @match https://piugame.com/my_page/recently_played.php
// @match https://www.piugame.com/my_page/recently_played.php
// @icon https://www.google.com/s2/favicons?sz=64&domain=piugame.com
// @grant none
@clsource
clsource / install-elixir-debian-12.md
Last active June 5, 2026 03:44
Install Elixir in Debian 12

Hello! I am Camilo from Chile 🇨🇱. I am using a translator. I hope this information is useful.

In this article we will see how to install Elixir in Debian 12 using asdf vm.

Why Debian 12?

Debian (GNU/Linux in general) allow us to use really old hardware. I managed to revive an old Dell Latitude e430 (from 2007) and use the latest version of Erlang, Elixir and Firefox in it.

It's magical to use old machines and give them a new life, reducing the electronic waste and helping the planet.