Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Jeff Hampton jhampton

🎯
Focusing
  • Sony Interactive Entertainment
  • San Francisco, CA, USA
Block or report user

Report or block jhampton

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jhampton
jhampton / getDeepValues.js
Last active Feb 8, 2018
Deep JavaScript Object search with filtered keys and array support
View getDeepValues.js
/**
example:
const searchDown = getDeepValues(
['testId', 'caption', 'model', 'modelId'],
action.payload.memoizedProps,
['memoizedProps', 'props' ,'child', 'children']
);
const searchUp = getDeepValues(
['testId', 'caption', 'model'],
action.payload.return,
@jhampton
jhampton / README.md
Last active Aug 29, 2015 — forked from zenorocha/README.md
A template for Github READMEs (Markdown) + Sublime Snippet
View README.md

Client Name - Project Name

TODO: Describe what the project is, what it does

Included Technology

  • Use bullet points to lay out languages and modules like so:
  • PHP (>=5.5.x)
  • Uses the Amazon AWS PHP library (link to library)
  • node.js (0.10.36 or higher)
View _linear-gradient.scss
@mixin linear-gradient($angle, $color-stops...) {
$_angle-with-vendor-prefix: "";
$_angle: "";
@if $angle == "to top" or $angle == "bottom" {
$_angle-with-vendor-prefix: bottom;
$_angle: to top;
} @else if $angle == "to right" or $angle == "left" {
$_angle-with-vendor-prefix: left;
$_angle: to right;
} @else if $angle == "to bottom" or $angle == "top" {
@jhampton
jhampton / gist:8361127
Last active Jan 2, 2016
Simple PHP Curl Wrapper
View gist:8361127
// create curl function
function curlContents($url, $method = 'GET', $data = false, $headers = false, $returnInfo = false) {
$ch = curl_init();
if($method == 'POST') {
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
if($data !== false) {
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
}
View hatchshow.js
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8">
$(window).load(function(){
$().hatchShow();
});
jQuery.fn.hatchShow = function(){
$('.hsjs').css('display','inner-block').css('white-space','pre').each(function(){
var t = $(this);
t.wrap("<span class='hatchshow_temp' style='display:block'>");
var pw = t.parent().width();
You can’t perform that action at this time.