Skip to content

Instantly share code, notes, and snippets.

View maartenJacobs's full-sized avatar
🏠
Working from home

Maarten Jacobs maartenJacobs

🏠
Working from home
View GitHub Profile
@maartenJacobs
maartenJacobs / convert_to_verified_routes.ex
Created April 5, 2023 12:43 — 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")
@maartenJacobs
maartenJacobs / strategy_storage.js
Created May 16, 2012 15:56 — forked from stugoo/gist:2711536
session / local storage switcher
var shortlistings = (function() {
"use strict";
var exports = {
disableSession: disableSession,
enableSession: enableSession,
set: set
},
session_storage_method = window.sessionStorage,
local_storage_method = window.localStorage,