Skip to content

Instantly share code, notes, and snippets.

View playwellsteve's full-sized avatar

Steve Halford playwellsteve

  • Play-Well TEKnologies
  • San Rafael, California
View GitHub Profile
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@playwellsteve
playwellsteve / index.html
Last active October 30, 2017 01:58
rYNRqm
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
@playwellsteve
playwellsteve / ValetSwitchPHP.md
Created August 15, 2017 17:12 — forked from bgarrant/ValetSwitchPHP.md
How to Switch PHP Version in Laravel Valet between PHP 7.1 and PHP 5.6

Valet switch PHP version with these commands

Install PHP 5.6 and switch Valet to PHP 5.6

valet stop
brew unlink php71
brew install php56
brew install php56-mcrypt
brew link php56
valet start
@playwellsteve
playwellsteve / .bash_profile
Created December 11, 2016 20:23 — forked from JeffreyWay/.bash_profile
Prettier git logs
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@playwellsteve
playwellsteve / gist:2702536a8df0efc025d1d02ce0a2d01c
Last active August 14, 2016 22:29 — forked from arunbsar/gist:c63660b76f3cd5794c916ce703a0a549
While Laravel Eloquent class performs standard timestamp management, this script will work in ALL cases (such as migrations which are using the basic insert command). In addition, this script provides the ability to override the format being used to store timestamps.
$dt=new DateTime;$model->created_at=$dt->format('m-d-y H:i:s');
/*
* This block of code could be added to your models (or you can create a new model which contains these and extend from your
* model. Each section will make sure the created_at and updated_at timestamp fields are updated in the database.
*/
class YourModel extends Eloquent....
public $timestamps = false;
<!DOCTYPE html>
<html>
<head>
<script src="https://fb.me/react-with-addons-0.14.7.min.js"></script>
<script src="https://fb.me/react-dom-0.14.7.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
body {
<!DOCTYPE html>
<html>
<head>
<script src="https://fb.me/react-with-addons-0.14.7.min.js"></script>
<script src="https://fb.me/react-dom-0.14.7.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
body {
// requires an array sorted in ascending order
var possibleCombinationSum = function(arr, n) {
// easiest case: n is in the array somewhere
if (arr.indexOf(n) >= 0) { return true; }
// if the smallest element is > n, no solution, so finish
if (arr[0] > n) { return false; }
// get rid of any elements larger than n, recursively
if (arr[arr.length - 1] > n) {
arr.pop();
<!DOCTYPE html>
<html>
<head>
<script src="http://vuejs.org/js/vue.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.container {
display: flex
}