Skip to content

Instantly share code, notes, and snippets.

View OliverMensahDev's full-sized avatar

Oliver Mensah OliverMensahDev

View GitHub Profile
@taniarascia
taniarascia / auth.md
Last active February 11, 2024 23:16
JavaScript Authentication & Authorization Book/Course

Authentication in Real-World Web Apps with JavaScript

Outline of ideas, concepts to cover, potential projects to write.

Setup Idea

  • Book with a video for each chapter.

Prerequisites/Overview

@bradtraversy
bradtraversy / webdev_online_resources.md
Last active April 17, 2024 12:44
Online Resources For Web Developers (No Downloading)
@getify
getify / 1.md
Last active October 15, 2020 01:44
BetterPromise: a strawman experiment in subclassing Promise and "fixing" a bunch of its awkward/bad parts

Some things that are "better" with this BetterPromise implementation:

  • BetterPromise # then(..) accepts a BetterPromise (or Promise) instance passed directly, instead of requiring a function to return it, so that the promise is linked into the chain.

    var p = BetterPromise.resolve(42);
    
    var q = Promise.resolve(10);
    
    p.then(console.log).then(q).then(console.log);
@kentcdodds
kentcdodds / README.md
Created October 25, 2017 22:01
Rendering a function with React

Rendering a function with React

No, this isn't about render props

I'm going to clean this up and publish it in my newsletter next week!

Context

So react-i18n (not the npm one... one we made at PayPal internally) has this

@twmilli
twmilli / Button.js
Created May 4, 2017 23:51
Simple Button in React Native
import React from 'react';
import { StyleSheet, Text, TouchableOpacity } from 'react-native';
const Button = (props) => {
const { buttonStyle, textStyle } = styles;
return (
<TouchableOpacity style={buttonStyle} onPress={props.onPress}>
<Text style={textStyle}>
{props.children}
</Text>
</TouchableOpacity>
@brianhogg
brianhogg / sample-plugin.php
Created March 17, 2016 02:30
Example of is_new
<?php
/*
Plugin Name: Sample Plugin
Plugin URI: https://brianhogg.com/
Description: Showing is_new
Version: 1.0
Author: Brian Hogg
Author URI: https://brianhogg.com
License: GPLv2 or later
*/
@maglietti
maglietti / gistColaboration.md
Created August 21, 2015 16:33
How to collaborate on a gist

To colaborate on a gist:

  1. Clone your gist repo locally
  2. Add your friend’s fork as a remote e.g. if your friend is named Cindy: git remote add-url cindy https://gist.github.com/cindy/df03bdacaef75a80f310
  3. Fetch your friend’s commits: git fetch cindy/master
  4. Merge your friend’s changes into your repo: git merge cindy/master
  5. Push the changes back to GitHub: git push origin/master
@thepsion5
thepsion5 / gist:19ae573f6939ff40992f
Created January 30, 2015 18:49
Shell Script to run migrations and database seeders on a Laravel 4 application and dump the resulting DB contents to a SQL file
#!/bin/bash
#Retrieves an environment variable from the correct environment file
#Based on the specified environment
#Example: getEnvVariable local DB_USER VARIABLE
#Will attempt to retrieve the DB_USER array value from the file at .env.local.php
#And then store the result in VARIABLE
getEnvVariable(){
local RESULT=$3
local LOCAL_RESULT=$(php -r '
$file = getcwd() . "/.env." . trim($argv[1]) . ".php";
@kwmt
kwmt / Castle.xml
Last active November 9, 2021 01:16 — forked from bemasher/Castle.xml
<?xml version="1.0" encoding="UTF-8" ?>
<Data>
<Series>
<id>83462</id>
<Actors>|Nathan Fillion|Stana Katic|Molly C. Quinn|Jon Huertas|Seamus Dever|Tamala Jones|Susan Sullivan|Ruben Santiago-Hudson|Monet Mazur|</Actors>
<Airs_DayOfWeek>Monday</Airs_DayOfWeek>
<Airs_Time>10:00 PM</Airs_Time>
<ContentRating>TV-PG</ContentRating>
<FirstAired>2009-03-09</FirstAired>
<Genre>|Drama|</Genre>