Skip to content

Instantly share code, notes, and snippets.


David Mead daveygm

View GitHub Profile
daveygm / readcsv.php
Last active Aug 29, 2015
Read CSV Into 2 Dimensional Array
View readcsv.php
// Auto detect line endings so more CSV's are compatible.
ini_set("auto_detect_line_endings", true);
// Read a CSV and make a 2 dimensional array from the data
// Pass the name of the CSV as an argument when calling the funciton.
function readCSV($filename) {
$data = array();
if (file_exists($filename)) {
View markdown2html
#!/usr/bin/env ruby
require "fileutils"
require "redcarpet"
<!DOCTYPE html>
daveygm / gist:4088949
Created Nov 16, 2012 — forked from astorm/gist:992233
Fix console.log in Chrome and Magento
View gist:4088949
<!-- Add to the package layout (via local.xml or however you prefer) -->
<!-- Also, best to remove before deployment, as some users report -->
<!-- it makes IE 7 crash -->
<reference name="content">
<block type="core/text" name="fix.console" as="fix.console">
<action method="setText">
<text><![CDATA[<script type="text/javascript">
iframe = document.createElement('iframe'); = 'none';
View Preferences.sublime-settings
"Line_padding_bottom": 1,
"Line_padding_top": 1,
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme",
"font_face": "Source Code Pro",
"font_size": 15,
"highlight_line": true,
daveygm / cookie.js
Created Jul 23, 2012
JS: Read, write and erase cookies with JavaScript.
View cookie.js
You can’t perform that action at this time.