Skip to content

Instantly share code, notes, and snippets.

@alihasan
alihasan / jquery.flattenObjectPoint.js
Created May 13, 2010 18:40
Flattens part of an object into the parent object.
/*
Name: jquery.flattenObjectPoint.js
Description: Flattens part of an object into the parent object.
Usage:
var foo = {
a : ‘hello’,
b: ‘world’
c: {
a : ‘hello’,
b: ‘world’
<?xml version="1.0" encoding="utf-8"?>
<VAST version="2.0">
<Ad id="110147312">
<InLine>
<AdSystem version="1">Flingo</AdSystem>
<AdTitle><![CDATA[Netflix CTV - Action 30 (copy)]]></AdTitle>
<Description><![CDATA[Netflix CTV - Action 30 (copy) ad]]></Description>
<Error id=""><![CDATA[http://pubads.g.doubleclick.net/pagead/conversion/?ai=BN_Llof6mVIOuH8adkwK3x4DgBsCr3vwFAAAAEAEggKrnIDgAWMD0pfy9AWDJ9viGyKOgGboBDTE5MjB4MTA4MF94bWzIAQWYAsjiAcACAuACAOoCIy8xMzQ2MzYzNTIvdG16L2N0di9saW5lYXJWaWRlby9yb2t1-AKF0h6QA_ABmAOkA6gDAeAEAaAGIw&sigh=Kt94Tuq_SvE&label=videoplayfailed]]></Error>
<Impression id=""><![CDATA[http://pubads.g.doubleclick.net/pagead/adview?ai=BN_Llof6mVIOuH8adkwK3x4DgBsCr3vwFAAAAEAEggKrnIDgAWMD0pfy9AWDJ9viGyKOgGboBDTE5MjB4MTA4MF94bWzIAQWYAsjiAcACAuACAOoCIy8xMzQ2MzYzNTIvdG16L2N0di9saW5lYXJWaWRlby9yb2t1-AKF0h6QA_ABmAOkA6gDAeAEAaAGIw&sigh=5To0rFV--Fk]]></Impression>
<Creatives>
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
local BLACK="\[\033[0;30m\]"
#!bash
#
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#

Keybase proof

I hereby claim:

  • I am alihasan on github.
  • I am alihasan_cota (https://keybase.io/alihasan_cota) on keybase.
  • I have a public key ASAC3OhP9lGwBnuwvI6VT3VhLzJjh6e3SzwrRxpa54p0lgo

To claim this, I am signing this object:

// apollo-client stuff
const ApolloClient = require('apollo-client').default;
const ApolloInMemoryCache = require('apollo-cache-inmemory').InMemoryCache;
const ApolloHttpLink = require('apollo-link-http').HttpLink;
const gql = require('graphql-tag');
// Node.js does not support ES6 fetch natively
const fetch = require('node-fetch');
const client = new ApolloClient({