Skip to content

Instantly share code, notes, and snippets.

View 1stevengrant's full-sized avatar
🏠
Working from home

Steven Grant 1stevengrant

🏠
Working from home
View GitHub Profile
<a class="twitter-timeline" href="https://twitter.com/recoverypathway" data-widget-id="530025661612568576">Tweets by @recoverypathway</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
{!-- this generates the yearly nav --}
{exp:low_yearly_archives channel="news_article" start_month="1" status="not closed" sort="desc"}
{if year_count == 1}<ul>{/if}
<li>
<a href="{path=archive}{year}">{year}</a>
</li>
{if year_count == total_years}</ul>{/if}
{/exp:low_yearly_archives}
{!-- archive template -- }
{exp:low_search:form result_page="search/results" form_class="search-form"}
<input type="search" name="keywords" id="keywords" value="{low_search_keywords}" placeholder="Search">
<input type="submit" class="visually-hidden" value="Submit" />
{/exp:low_search:form}
{exp:low_search:results limit="20" paginate="bottom" }
{if count == 1}
<h2>Search Results for "{low_search_keywords}" ({absolute_results} total results)</h2>
<hr class="hr-big" />
<div class="latest-articles">
{/if}
<div class="row format-standard article-entry">
<div class="mini-2 columns reactions-wrap">
<div class="reactions">
<p>
ulimit -n 4096
export PATH="/usr/local/mysql/bin:$PATH"
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1="\[\e[01;31m\]\w \$(parse_git_branch): \[\e[00m\]"
if [ -f `brew --prefix`/etc/bash_completion ]; then
<div class="sprite image-name"></div>
<div class="icon svg-file-name"></div>
{% extends "_layout" %}
{% set query = craft.request.getParam('q') %}
{% set title = "Search results for: {{ query }}" %}
var message;
var myRegExp =/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]+-?)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]+-?)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/i;
var urlToValidate = feature.properties.url;
if (!myRegExp.test(urlToValidate)){
var popupContent = feature.properties.title +
'<br>' + feature.properties.address + '<br>' + feature.properties.city;
} else {
var popupContent = '<a target="_blank" class="popup" href="' + feature.properties.url + '">' + feature.properties.title + '</a><br>' + feature.properties.address + '<br>' + feature.properties.city;
<?php
if ( ! defined('EXT')){
exit('Invalid file request');
}
require 'config.php';
<?php
$config['cookie_httponly'] = "y";
if ( ! defined('EXT')){
exit('Invalid file request');
}
$protocol = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") ? "https://" : "http://";
$base_url = $protocol . $_SERVER['HTTP_HOST'];
$base_path = $_SERVER['DOCUMENT_ROOT'];