Skip to content

Instantly share code, notes, and snippets.

View nerdyworm's full-sized avatar
:shipit:
distracted like an adhd squirrel

Benjamin Rhodes nerdyworm

:shipit:
distracted like an adhd squirrel
View GitHub Profile
@andrewhao
andrewhao / game.ex
Last active August 7, 2023 21:37
Dynamic Supervisors in Elixir
defmodule Game do
use GenServer
def init(game_id) do
{:ok, %{game_id: game_id}}
end
def start_link(game_id) do
GenServer.start_link(__MODULE__, game_id, name: {:global, "game:#{game_id}"})
end
@kumekay
kumekay / rename_phoenix_project.sh
Last active November 7, 2021 06:13 — forked from nerdyworm/rename.sh
rename a phoenix 1.3 project
#!/bin/bash
set -e
CURRENT_NAME="CurrentName"
CURRENT_OTP="current_name"
NEW_NAME="NewName"
NEW_OTP="new_name"
@steveklabnik
steveklabnik / ember_template.rb
Last active June 4, 2016 16:57
A template for making Ember apps with Rails.
run "sed --in-place '/turbolinks/d' Gemfile"
run "sed --in-place '/turbolinks/d' app/assets/javascripts/application.js"
run "sed --in-place '/coffee/d' Gemfile"
run "sed --in-place '/jbuilder/d' Gemfile"
run "sed --in-place 's/, \"data-turbolinks-track\" => true//' app/views/layouts/application.html.erb"
gem 'active_model_serializers'