Skip to content

Instantly share code, notes, and snippets.

View rochellelewis's full-sized avatar
🙃
(ノ^◡^)ノ︵ ┻━┻ ︵ ( . 0 .)

Rochelle Lewis rochellelewis

🙃
(ノ^◡^)ノ︵ ┻━┻ ︵ ( . 0 .)
View GitHub Profile
@rochellelewis
rochellelewis / README.md
Last active June 9, 2020 02:30
React CSS Flexbox Sticky Footer

React Compatible Flexbox Sticky Footer

Instructions:

  1. Add CSS from index.css into your project's stylesheet
  2. In your app/public/index.html file, add class="sfooter" to <div id="root">
  3. In your src/index.js file, wrap all the markup that lives inside and sits *above your footer* inside a (See lines 31, 39 in index.js)
@rochellelewis
rochellelewis / pass-hashing.php
Created March 27, 2017 04:41
Demo of simple password hashing in PHP.
<?php
$pass = "password123";
$activationToken = bin2hex(random_bytes(16));
$salt = bin2hex(random_bytes(16));
$hash = hash_pbkdf2("sha512", $pass, $salt, 262144);
echo "The following values are good for SALT and ACTIVATION that are CHAR(32) data, and HASH that is CHAR(128) data.";
echo "password: " . $pass . "\n\n";
@rochellelewis
rochellelewis / head-utils.php
Last active November 24, 2015 05:39
PHP Relative Pathing
<?php
/**
* Get the relative path.
* @see https://raw.githubusercontent.com/kingscreations/farm-to-you/master/php/lib/_header.php FarmToYou Header
**/
// include the appropriate number of dirname() functions
// on line 8 to correctly resolve your directory's path
require_once(dirname(dirname(__DIR__)) . "/root-path.php");
$CURRENT_DEPTH = substr_count($CURRENT_DIR, "/");
@rochellelewis
rochellelewis / keybase.md
Last active October 12, 2020 22:12
keybase.io proof

Keybase proof

I hereby claim:

  • I am rochellelewis on github.
  • I am rlewis37 (https://keybase.io/rlewis37) on keybase.
  • I have a public key whose fingerprint is 1F68 F839 2A80 9526 D60E 8B03 547A 8D31 08A8 3832

To claim this, I am signing this object:

@rochellelewis
rochellelewis / autoload.php
Created November 10, 2015 15:52
Class Autoloader
<?php
/**
* Class Autoloader
* stolen from Skyler
* sin verguenza
*
* @author Skyler Rexroad
*/
spl_autoload_register("Autoloader::classLoader");
@rochellelewis
rochellelewis / index.html
Last active August 29, 2015 14:20
Basic CSS Activity
<div class="callout">
<h2>This is a Call to Action</h2>
<p>Here is some text here. And this is a link to the <a style="color:red; font-weight: bold;" href="#">Contact Page</a>.</p>
</div>
@rochellelewis
rochellelewis / index.html
Last active August 29, 2015 14:20
CSS Specificity & Inheritance Activity
<h1>This is a CSS Specificity Exercise</h1>
<header class="header-home">
<div id="navbar">
<ul class="navbar-nav">
<li><a href="#">Home</a></li>
<li><a href="#">About Me</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
</header>