Skip to content

Instantly share code, notes, and snippets.

View naeluh's full-sized avatar
🌐
Busy

nick hulea naeluh

🌐
Busy
View GitHub Profile
@naeluh
naeluh / template.html
Created October 9, 2015 18:10 — forked from tinabeans/template.html
A super-barebones single-column responsive email template, assuming a max-width of 540px. Read about it on the Fog Creek blog.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single-Column Responsive Email Template</title>
<style>
@media only screen and (min-device-width: 541px) {
.content {
@naeluh
naeluh / csv-to-json.php
Last active August 29, 2015 14:27 — forked from robflaherty/csv-to-json.php
Convert CSV to JSON
<?php
/*
* Converts CSV to JSON
* Example uses Google Spreadsheet CSV feed
* csvToArray function I think I found on php.net
*/
header('Content-type: application/json');
// Set your CSV feed
{
"Items": [{
"node": {
"nid": "3857",
"field_calendar_date3_value": "2015-05-18 00:00:00",
"field_calendar_date3_value_1": "2015-05-18 00:00:00",
"field_start_time_value": "2015-00-00T09:15:00",
"field_end_time_value": "2015-00-00T17:00:00",
"field_event_name_value": "MUSEUM ALERT",
"field_event_description_value": "Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test \r\n",
<?php
$app = "/app_1/";
$preTitle = 'a';
function seoUrl($string)
{
$string = strtolower($string); // Lower case everything
$string = preg_replace("/[^a-z0-9_\s-]/", "", $string); // Make alphanumeric (removes all other characters)
$string = preg_replace("/[\s-]+/", " ", $string); // Clean up multiple dashes or whitespaces
<?php
/**
* Sends a simple email.
* [or] Tested on 2012-05-31 using Drupal 7.12
*
* Usage:
* 1) Paste all the below code into your module or include
* 2) Configure the two @FIXME's.
* 3) Visit /_custom_simple_mail to get an email.
*
/var/www/cforms/public_files/4dchat/node_modules/socket.io/lib/socket.js:224
self.rooms.push(room);
^
TypeError: undefined is not a function
at /var/www/cforms/public_files/4dchat/node_modules/socket.io/lib/socket.js:224:16
at process._tickCallback (node.js:355:11)
var express = require('express'),
multer = require('multer'),
app = express(),
http = require('http'),
server = http.createServer(app),
io = require('socket.io').listen(server);
server.listen(6969);
@naeluh
naeluh / index.html
Created February 27, 2015 19:49
Grandes Maestros | Natural History Museum of Los Angeles // source http://jsbin.com/doqopa
<html class="js">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Grandes Maestros | Natural History Museum of Los Angeles</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="http://stage.nhm.org/site/sites/all/themes/zen_nhm_theme/images/favicon.ico" type="image/x-icon">
<meta name="keywords" content="nhm,natural history museum,los angeles county">
<meta name="dcterms.date" content="2014-06-26T00:00:00Z">
<meta name="copyright" content="©2011 Natural History Museum of Los Angeles County">
<link rel="canonical" href="http://stage.nhm.orghttp://stage.nhm.org/site/explore-exhibits/special-exhibits/grandes-maestros">
functionReference([
{
"CDSCode":"",
"District":"",
"School":"",
"Street":"",
"City":"",
"Zip":"",
"Phone":"",
"Charter":"",