Skip to content

Instantly share code, notes, and snippets.

View pau-riosa's full-sized avatar
🎉
Happy Coding!

paugramming pau-riosa

🎉
Happy Coding!
View GitHub Profile
import React from 'react';
import {Platform, Text, StyleSheet, TextInput, View, TouchableOpacity} from 'react-native';
import {Overlay, Header} from 'react-native-elements';
import DateTimePicker from '@react-native-community/datetimepicker';
import moment from "moment";
export interface IProps {
date?: string;
placeholder?: string;
@pau-riosa
pau-riosa / _variables.scss
Created April 11, 2020 16:24
Webpack Configuration with: [Tailwind CSS, Fontawesome Icons]
$fa-font-path: "~@fortawesome/fontawesome-free/webfonts";
@daemonfire300
daemonfire300 / email.exs
Created October 13, 2016 12:07
Simple shot at implementing an email validator for use with `Ecto.Changeset`
defmodule YourApp.Validators.Email do
use Ecto.Changeset
@mail_regex ~r/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/
# ensure that the email looks valid
def validate_email(changeset, field) do
changeset
|> validate_format(field, @mail_regex)
end
end
@adamjohnson
adamjohnson / publickey-git-error.markdown
Last active October 23, 2024 11:31
Fix "Permission denied (publickey)" error when pushing with Git

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "[email protected]". Th