Skip to content

Instantly share code, notes, and snippets.

Keith Penderis

Block or report user

Report or block Penderis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:ff551d08406b9b1b789b403821d195bd
Verifying my Blockstack ID is secured with the address 1442k9DeF52AJMAgePCRZvtooxvB4hAVAa
View get jpg image
$imgGet = file_get_contents("");
Penderis / downloadFacebookAlbum.js
Created Sep 16, 2016
Download facebook album when in full view
View downloadFacebookAlbum.js
function gettingNext(){
var getNext = document.getElementsByClassName('snowliftPager next');
return getNext;
function newOptions(){
var options = document.querySelector('a[data-action-type="open_options_flyout"');
// console.log(options);
return options;
Penderis / CalculateSavings.js
Created Jan 17, 2016
Calculate saving over period at 5% increase per month
View CalculateSavings.js
var Interest = 1.05;
var Base = 200;
var Total = 0;
var Count = 12;
for (i = 1;i< Count;i++){
console.log("Base: "+Base*Interest)
console.log("Total: "+Total)
Total += Base;
Base = Base*Interest;
View Code Definitions that explain clearly
##PHP Interfaces
It seems like many contributors are missing the point of using an INTERFACE. An INTERFACE is not specifically provided for abstraction. That's what a CLASS is used for. Most examples in this article of interfaces could be achieved just as easily using just classes alone.
An INTERFACE is provided so you can describe a set of functions and then hide the final implementation of those functions in an implementing class. This allows you to change the IMPLEMENTATION of those functions without changing how you use it.
For example: I have a database. I want to write a class that accesses the data in my database. I define an interface like this:
interface Database {
function listOrders();
function addOrder();
Penderis / Mailcatcher Vagrant
Last active Sep 30, 2015
Add mailcatcher to Scotchbox
View Mailcatcher Vagrant
Using MailCatcher I can see the emails sent by the website.
First checkout to get your box ready All I did was
Log into the vagrant box and run
sudo apt-get install libsqlite3-dev
sudo apt-get install ruby1.9.1-dev -y
Penderis / Laravel Ajax.js
Last active Aug 29, 2015
Laravel ajax that works
View Laravel Ajax.js
jQuery( document ).ready( function( $ ) {
$( '#form-add-setting' ).on( 'submit', function() {
//show some spinner etc to indicate operation in progress
$( this ).prop( 'action' ),
Penderis / assocCSV.php
Last active Aug 29, 2015
Create CSV from Associative Array - PHP
View assocCSV.php
//header nulled first line will make not nulled thus creating csv with header values
$pathToGenerate = "path to new file location including filename";
//create directory if does not exist beforehand, file will be created or override in fopen with w+ flag
$createFile = fopen($pathToGenerate,"w+");
foreach ($assocArray as $row) {
//this matches the first line to create header values
Penderis / Batch Recursive File Copier.bat
Last active Aug 29, 2015
Windows Batch Script to recursively copy files from folders into new folder using a text document with filenames
View Batch Recursive File Copier.bat
@echo off
setlocal EnableDelayedExpansion
REM Changes root path to relative of current bat folder
pushd "%~dp0"
REM finds files in provided .txt file and copies them to destination directory
COPY /b/y NUL %WINDIR%\06CF2EB6-94E6-4a60-91D8-AB945AE8CF38 >NUL 2>&1
View CSS-Line-break---Color-Control.markdown

CSS Line break - Color Control

Hoping to find a easy multi use CSS line break method for Inline text to wrap with padding. This is a combination of the box-shadow and border-left method , such case that box-shadow does not work I still have left padding. Small price to pay. Multi Line Text - CSS Tricks

A Pen by Keith on CodePen.


You can’t perform that action at this time.