Skip to content

Instantly share code, notes, and snippets.

View juanpujol's full-sized avatar
🇧🇷
Always Working Remotely

Juan Pujol juanpujol

🇧🇷
Always Working Remotely
View GitHub Profile
@fnimick
fnimick / supabase_profile_sync.sql
Last active July 14, 2024 22:17
Create a `public.profile` table and keep it in sync with supabase `auth.users` for selected fields in both directions.
/**
* USERS
* Note: This table contains user data. Users should only be able to view and update their own data.
* Some data is synced back and forth to `auth.users` as described below.
*
* `full_name`: synced in both directions
* `email`: synced from user metadata to profile only
* `avatar_url`: synced from user metadata to profile only
* `terms_accepted_at`: synced from profile to user metadata only
*/
@barbietunnie
barbietunnie / additional_notes.md
Last active June 26, 2024 01:20 — forked from JaisonBrooks/remove_input_number_scroll.js
Disable Input[type=number] scroll action

Disable Input[type=number] scroll action

WebKit desktop browsers add little up down arrows to number inputs called spinners.

These spinners have their value changed inadvertently when the scroll wheel is active on the number field. To prevent this from happen, you may choose to prevent this functionality, even though it ignores accessibility considerations.

Here are further discussions regarding this:

@bennadel
bennadel / lazy-loading-images.htm
Created July 23, 2013 13:04
Lazy Loading Image With AngularJS
<!doctype html>
<html ng-app="Demo" ng-controller="AppController">
<head>
<meta charset="utf-8" />
<title>
Lazy Loading Images With AngularJS
</title>
<style type="text/css">
@facultymatt
facultymatt / Procfile
Created April 12, 2013 16:23
Get Deployd running on Heroku!
web: node server
$(document).ready(function() {
$('table.tracks tbody').makeSortable({ url: "<%= sort_my_mix_tracks_path(mix) -%>" });
});
@aiwilliams
aiwilliams / README.md
Created May 16, 2012 13:52
Storyboard in RubyMotion 1.4

Start XCode and create a new Storyboard file. I closed all my other XCode projects. When you choose the location of the created file, it should be your RubyMotion project's resources directory. Add a UIViewController, and set it's identifier property to "Start". Add some UI elements so you can see it working.

When you run rake in your RubyMotion project, it will compile the .storyboard file. You could auto-load the Storyboard using a plist configuration, but you'll see code can do it too.

@jwo
jwo / registrations_controller.rb
Created September 30, 2011 23:11
API JSON authentication with Devise
class Api::RegistrationsController < Api::BaseController
respond_to :json
def create
user = User.new(params[:user])
if user.save
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201
return
else