Skip to content

Instantly share code, notes, and snippets.

View mracos's full-sized avatar

marcos ferreira mracos

View GitHub Profile
@mracos
mracos / convert_to_verified_routes.ex
Created June 14, 2023 13:36 — forked from andreaseriksson/convert_to_verified_routes.ex
This is a mix task for converting old Phoenix routes to new verified routes
defmodule Mix.Tasks.ConvertToVerifiedRoutes do
@shortdoc "Fix routes"
use Mix.Task
@regex ~r/(Routes\.)(.*)_(path|url)\(.*?\)/
@web_module MyAppWeb
def run(_) do
Path.wildcard("lib/**/*.*ex")
@mracos
mracos / init.lua
Created July 20, 2022 13:42
neovim lspconfig and lsp-installer
-- assuming require("packer").startup({ function(use)
{ "williamboman/nvim-lsp-installer", -- all lsp
requires = { -- everything that needs to be attached manually
{ "neovim/nvim-lspconfig" },
{ "lukas-reineke/lsp-format.nvim", config = function() require("lsp-format").setup() end, },
},
config = function()
local m_lsp = require("m.lsp")
local lsp_format = require("lsp-format")
local m_nvim_lsp_installer = require("m.nvim_lsp_installer")
cask 'anne-pro' do
version '0.3'
sha256 '8fb3be3a4d80c631c1f220e024d7629766f93ba2675678f94841bdadd89a1c0e'
url "https://github.com/msvisser/AnnePro-mac/releases/download/v#{version}/AnnePro.app.zip"
appcast 'https://github.com/msvisser/AnnePro-mac/releases.atom'
name 'Anne Pro'
homepage 'https://github.com/msvisser/AnnePro-mac'
app 'AnnePro.app'
@mracos
mracos / [email protected]
Last active April 6, 2020 04:10
DEPRECATED (https://github.com/mracos/homebrew-personal) - Patched cask recipe for wacom drivers version @ version 5.3.7-6 (for CTL-460, CTT-460, CTL-660 - Bamboo Pen) - https://github.com/thenickdude/wacom-driver-fix/
# Cask recipe reference: https://github.com/fturcheti/homebrew-drivers/blob/c3f8c1c0b89a6869d8729b343e2ed2e90ed8e2c9/Casks/wacom-bamboo-tablet.rb
# Patch to work with catalina https://github.com/thenickdude/wacom-driver-fix/
# Patch reference: https://www.reddit.com/r/wacom/comments/eeznhd/fixed_driver_for_bamboo_tablets_on_macos_catalina/
cask '[email protected]' do
version '5.3.7-6,patch-5'
sha256 '97ed7a0e3f1d3b73c405d3b72adf4eef48374fe216e1fdcbc0a9eb84f823036b'
url "https://github.com/thenickdude/wacom-driver-fix/releases/download/#{version.after_comma}/Install-Wacom-Tablet-#{version.major_minor_patch}-patched.pkg"
name 'Wacom Bamboo Tablet'
@mracos
mracos / intellij-idea-ce.rb
Last active April 6, 2020 04:10
DEPRECATED (https://github.com/mracos/homebrew-personal) - Homebrew cask recipe for IntelliJ Idea CE (Community Edition) @ version 2019.1.4
cask 'intellij-idea-ce' do
version '2019.1.4'
sha256 '45e5d4454b7af328c9c1279559a49d8db80eea8eaa1187ff0fc1cc3643074be9'
url "https://download.jetbrains.com/idea/ideaIC-#{version}.dmg"
appcast 'https://data.services.jetbrains.com/products/releases?code=IIC&latest=true&type=release'
name 'IntelliJ IDEA Community Edition'
name 'IntelliJ IDEA CE'
homepage 'https://www.jetbrains.com/idea/'
@mracos
mracos / intellij-idea.rb
Last active April 6, 2020 04:09
DEPRECATED (https://github.com/mracos/homebrew-personal) - Homebrew cask recipe for IntelliJ Idea @ version 2019.1.4
cask 'intellij-idea' do
version '2019.1.4'
sha256 '600b0446ae02fee208caf4e0423b984a3c853ef289fcd10b6b0e7081e1559d53'
url "https://download.jetbrains.com/idea/ideaIU-#{version}.dmg"
appcast 'https://data.services.jetbrains.com/products/releases?code=IIU&latest=true&type=release'
name 'IntelliJ IDEA Ultimate'
homepage 'https://www.jetbrains.com/idea/'
auto_updates true

Day 1 - Clean up your README Today’s exercise: spend 20 minutes improving your README.

Why? Because it serves as your project’s welcome mat. A good README will save you time and frustration when new people join your project (as internal team members, or open-source contributors). It also serves as the sales pitch for your app or library.

Here are some ideas of things to add to your README to flesh it out:

If your codebase is a library:

The philosophy behind your tool

cask 'tomahawk' do
version '0.8.4'
sha256 '65fba8767e21b898a61feeb077ae9a87685b5ebf4d2ecbccddd7168e85e695da'
url "http://download.tomahawk-player.org/Tomahawk-#{version}.dmg"
appcast 'https://github.com/tomahawk-player/tomahawk/releases.atom',
checkpoint: '8b34e618385fe6f85a9887878b8cd2f11040e3d2c24a0364aa994c467e4c1bd8'
name 'Tomahawk'
homepage 'https://www.tomahawk-player.org/'
@mracos
mracos / git-audio
Created May 31, 2019 21:24
git audio macos only
#!/usr/bin/env ruby
require 'base64'
require 'tempfile'
if ARGV.count == 0
puts <<~HELP
Usage: git audio [command]
Commands available:
@mracos
mracos / application_name_web.ex.diff
Last active October 9, 2019 13:39
organization of plug folders
defmodule ApplicationNameWeb do
@moduledoc """
The entrypoint for defining your web interface, such
as controllers, views, channels and so on.
This can be used in your application as:
use ApplicationNameWeb, :controller
use ApplicationNameWeb, :view