Skip to content

Instantly share code, notes, and snippets.

View gobijan's full-sized avatar
🏝️
Deep in the Caribbean...

Bijan Rahnema gobijan

🏝️
Deep in the Caribbean...
View GitHub Profile
@bellatrix988
bellatrix988 / README.md
Last active January 12, 2023 22:26
Rails 7 & Hotwire & Turbo & Devise workaround

Rails 7 & Hotwire & Turbo & Devise workaround

This gist is relevant while this Devise issue#5446 is not closed or a better solution is not suggested.

Problem:

Not getting flashes errors using turbo.

Solutions:

1. Override FailureApp and devise parent controller.

@lazaronixon
lazaronixon / rubocop.yml
Last active October 21, 2022 17:49
Basecamp Rubocop Template
# This template is inspired on https://github.com/basecamp/audits1984/blob/master/.rubocop.yml
#
# 1 - Add dependencies to group :development, :test
# gem "rubocop", "~> 1.26", require: false
# gem "rubocop-performance", require: false
# gem "rubocop-rails", require: false
#
# 2 - Create a file .rubocop.yml and add the lines below
# inherit_from: https://gist.githubusercontent.com/lazaronixon/7815d84702f277ead5e89c9f2aa5581f/raw/rubocop.yml
#
@SteveSandersonMS
SteveSandersonMS / blazor-auth.md
Created June 11, 2019 10:49
Blazor authentication and authorization

Authentication and Authorization

Authentication means determining who a particular user is. Authorization means applying rules about what they can do. Blazor contains features for handling both aspects of this.

It worth remembering how the overall goals differ between server-side Blazor and client-side Blazor:

  • Server-side Blazor applications run on the server. As such, correctly-implemented authorization checks are both how you determine which UI options to show (e.g., which menu entries are available to a certain user) and where you actually enforce access rules.
  • Client-side Blazor applications run on the client. As such, authorization is only used as a way of determining what UI options to show (e.g., which menu entries). The actual enforcement of authorization rules must be implemented on whatever backend server your application operates on, since any client-side checks can be modified or bypassed.

Authentication-enabled templates for Server-Side Blazor

@MrGrigri
MrGrigri / md-color-palette.css
Last active February 15, 2024 12:25
Material Design Color Palette in CSS Variable Form
:root {
--material-color-red: #f44336;
--material-color-red-50: #ffebee;
--material-color-red-100: #ffcdd2;
--material-color-red-200: #ef9a9a;
--material-color-red-300: #e57373;
--material-color-red-400: #ef5350;
--material-color-red-500: var(--material-color-red);
--material-color-red-600: #e53935;
--material-color-red-700: #d32f2f;

GraphQL vs Firebase

With the variety of server-side technologies today, developers have a lot of choices when it comes to deciding what kind of backend to use for their next application.

In this article, we want to explore the differences between GraphQL and Firebase, two very popular server-side technologies.

Overview

Before diving into technical details, let's create some perspective on the two technologies and where they're coming from.

@dereckmartin
dereckmartin / IpnController.ex
Last active October 22, 2017 09:39
Phoenix Framework: PayPal IPN Handshake
defmodule AppName.IpnController do
@moduledoc """
IPN Controller.
"""
use AppName.Web, :controller
def create(conn, params) do
# PayPal requires the params returned in the exact order given.
# The map needs to be a list. encode/1 keep the order of a list,
.
├── books
│   ├── handlers.go
│   └── models.go
├── config
│   └── db.go
└── main.go

UPDATE: This issue has been fixed in Sketch 3.3.3. Go download the beta version now, or wait for the final version to be released in a few days.

The following content is kept here for historical reasons :)


Sketch Stuttering? Let us help you!

We're currently investigating an issue where Sketch stops responding at regular intervals. Judging from our reports, it started about 10 days ago (June 1st) for no apparent reason that we can think of (our last Sketch update was released on May 11st). We have some hypothesis, but we need your help to fix it since we haven't been able to reproduce it on our test machines.

If you need a quick workaround, keep reading :)

@paulochf
paulochf / countries.sql
Last active April 26, 2024 09:50 — forked from adhipg/countries.sql
Outdated. Used with discretion. Accepting updates.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@vsouza
vsouza / .bashrc
Last active June 14, 2024 08:45
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin