Skip to content

Instantly share code, notes, and snippets.

View jhonathas's full-sized avatar

Jhonathas jhonathas

View GitHub Profile
@longlostnick
longlostnick / uploads_controller.rb
Created June 17, 2014 18:20
Rails JSON file upload with carrierwave (from base64 string)
class Api::UploadsController < ApiController
def create
@upload = Upload.new(upload_params)
ensure
clean_tempfile
end
private
@nerdyworm
nerdyworm / rename.sh
Created July 30, 2016 17:40
rename a phoenix project
#!/bin/bash
set -e
CURRENT_NAME="CurentName"
CURRENT_OTP="current_name"
NEW_NAME="NewName"
NEW_OTP="new_name"
var div = document.querySelectorAll('div'),
result;
for (var i = 0; i < div.length; i++) {
result = div[i];
result.addEventListener('click', function() {
alert(this.innerHTML);
});
}
@josephan
josephan / setup_tailwind_in_phoenix.md
Last active August 8, 2023 05:50
Add Tailwind CSS to an Elixir/Phoenix Project with PurgeCSS