Skip to content

Instantly share code, notes, and snippets.

View nlively's full-sized avatar

Noah Lively nlively

View GitHub Profile
### Keybase proof
I hereby claim:
* I am nlively on github.
* I am noahlively (https://keybase.io/noahlively) on keybase.
* I have a public key ASB5CK8DJrec1dttTwJrQwD_JCpZUDlivWe75c5nfkbEJQo
To claim this, I am signing this object:
@nlively
nlively / react_native_app_infrastructure_pattern.txt
Created August 10, 2016 18:00
React Native App Infrastructure Pattern
- App/
- Assets/
- Images/
- logo.png
- Components/
- ReusableComponent1.js
- Lib/
- cssVar.js
- CSSVarConfig.js
- ResponsiveLayout.js
<?php
//collects the nodeword data
$query ='SELECT id, type, name, content FROM {nodewords} where name = '."'description' or name = 'keywords'";
$result = db_query($query);
//collect and place nodeword data in array for metatag data
foreach ($result as $row) {
if ($row->type == '5')
$nodewords_data[$row->id]['entity_type'] = 'node';
else
continue;
/**
* CATEGORY OPTIONS
* men
* women
* kids
* boys
* girls
*
* CLOTHING TYPE OPTIONS
* blazers
@nlively
nlively / rts.scss
Created September 6, 2013 19:01
RTS scss suggestion
// Section for variables
// These could be overridden through color schemes, and would be recognized
// at compile time. For this reason the defaults should probably be in a
// separate file so we don't overwrite our overrides here. :)
$mainButtonColor: orange; // these actual colors are just examples
$backgroundColor: black;
// Section for mixins
@mixin button-gradient($startColor, $endColor) {
<script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"></script>
<script type="text/javascript">
var locations;
(function($){
var map = null;
var pinInfoBox; //the pop up info box
locations = [
{
number: 1,
@nlively
nlively / fix-permissions.sh
Created July 8, 2013 19:22
Drupal permissions script. Save in /usr/local/bin and make executable. Assumes a default debian distribution where apache runs as user/group www-data Run like this: sudo fix-permissions.sh {PATH_TO_WEB_ROOT} {USER_NAME}
#!/bin/bash
path=${1%/}
user=${2}
group="www-data"
help="\nHelp: This script is used to fix permissions of a drupal installation\nyou need to provide the following arguments:\n\t 1) Path to your drupal installation\n\t 2) Username of the user that you want to give files/directories ownership\nNote: \"www-data\" (apache default) is assumed as the group the server is belonging to, if this is different you need to modify it manually by editing this script\n\nUsage: (sudo) bash ${0##*/} drupal_path user_name\n"
if [ -z "${path}" ] || [ ! -d "${path}/sites" ] || [ ! -f "${path}/modules/system/system.module" ]; then
echo "Please provide a valid drupal path"
echo -e $help
<html>
<body>
<a href="javascript:switchDeveloper()">Switch developer</a>
<div id="dev-name"></div>
@nlively
nlively / service_form.php
Created September 25, 2012 00:04
service_form.inc
<?php
$services = array (
"Sunday School" => "Sunday School",
"11AM" => "11AM",
"6PM" => "6PM",
"7PM (Tuesday)" => "7PM (Tuesday)"
);
$ratio = array (
50 => "Standard (4:3)", // put in the real term IDs here
51 => "Widescreen (16:9)",
@nlively
nlively / gist:2645069
Created May 9, 2012 14:51 — forked from arpitr/gist:2644788
site automation code put in a separate function and node structure for Mobile Website has been changed
<?php
/**
* Implementation of hook_ca_action().
*/
function webmobilize_ca_action() {
$order_arg = array(
'#entity' => 'uc_order',
'#title' => t('Order'),
);