Skip to content

Instantly share code, notes, and snippets.

🙂
We'll get there

Brittan McGinnis konamax123

🙂
We'll get there
Block or report user

Report or block konamax123

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
@konamax123
konamax123 / threeTimeZones.json
Created Jan 30, 2017
3 different timezone accounts
View threeTimeZones.json
{
"company" : {
"name" : "Los Angeles",
"description" : "Company1`",
"address" : {
"street1" : "123 main st",
"city" : "San Diego",
"state" : "CA",
"zip" : "92101"
}
@konamax123
konamax123 / nav.js
Last active Jan 4, 2017
route switch statement
View nav.js
const fullLink = '/advertisers/accounts';
const route = '/advertisers/accounts/create';
const accountId = '1234a';
console.log(route === `${fullLink}/create`) // => true
let isActive;
switch (route) {
case route === fullLink:
isActive = true;
break;
case route === `${fullLink}/create`:
View gist:0098f329bf2bc7a11bcc
////////////////////////////////////////////////////////////////////////////////
// Excercise:
//
// http://facebook.github.io/react/docs/reusable-components.html#prop-validation
//
// - Don't access `USERS` directly in the app, use a prop
// - Validate Gravatar's `size` property, allow it to be a
// a number, or a string that can be converted to a number,
// ie: `size="asdf"` should warn (hint: parseInt)
// - in emailType, what if the prop name isn't email? what if we wanted
View request-body-1.json
{
"OfferID":876,
"OfferValues":[
{
"key":"first-name",
"value":"Some"
},
{
"key":"last-name",
"value":"Guy"
@konamax123
konamax123 / contactform.js
Created Oct 17, 2015 — forked from insin/contactform.js
React contact form example
View contactform.js
/** @jsx React.DOM */
var STATES = [
'AL', 'AK', 'AS', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'HI',
'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS',
'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR',
'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY'
]
var Example = React.createClass({
@konamax123
konamax123 / object.js
Created Oct 7, 2015
object with some values as objects
View object.js
var obj = {
name: "Simon",
age: "20",
clothing: {
style: "simple",
isDouche: false
}
}
View gist:e6978c196396cc8d511b
==> default: Running provisioner: puppet...
==> default: Running Puppet with site.pp...
==> default: Notice: /Stage[main]//Node[default]/Exec[composer-install-dependencies]/returns: Loading composer repositories with package information
==> default: Notice: /Stage[main]//Node[default]/Exec[composer-install-dependencies]/returns: Installing dependencies (including require-dev) from lock file
==> default: Notice: /Stage[main]//Node[default]/Exec[composer-install-dependencies]/returns: - Installing zeeto/flux (dev-master f319731)
==> default: Notice: /Stage[main]//Node[default]/Exec[composer-install-dependencies]/returns: Cloning f319731a3c54bc3e31dad07c74dec02c8d7350be
==> default:
==> default: Notice: /Stage[main]//Node[default]/Exec[composer-install-dependencies]/returns:
==> default: Notice: /Stage[main]//Node[default]/Exec[composer-install-dependencies]/returns:
==> default: Notice: /Stage[main]//Node[default]/Exec[composer-install-dependencies]/returns:
View gist:1b5ce7ba3f99fb7378ed
{% if random(1) == 1 %}
{% set sidebarQuery = "withSidebar" %}
{% include 'file.html.twig' %}
{% else %}
{% set sidebarQuery = "withoutSidebar" %}
{% endif %}
@konamax123
konamax123 / gist:94ba50488efb9e418778
Last active Aug 29, 2015
Assigning a variable from ajax response
View gist:94ba50488efb9e418778
myObj = {
myAttr: function(){
$.ajax({
type: "GET",
url: myApi,
dataType: "jsonp",
success: function (data) {
return data
}
})
View contentSideBar.html.twig
<div class="sidebar-posts" xmlns="http://www.w3.org/1999/html">
<button class="dark-btn latest">Latest</button>
<button class="popular-posts active-btn">Most Popular</button>
<div class="shadowed">
<div class="post-scroll up"><div class="scroll-up-arrow"></div></div>
<ul class="gif-posts gif-sidebar">
{% for post in get_rail_posts('popular') %}
<li class="sidebar-popular">
<a href="{{ path('gif_site_post_view_by_slug', {slug: post.slug}) }}">
{{ resize_image(post, 98, 70, '', post.title, post.title) }}
You can’t perform that action at this time.