Skip to content

Instantly share code, notes, and snippets.

View peterj's full-sized avatar
🌟
....

Peter Jausovec peterj

🌟
....
View GitHub Profile
@peterj
peterj / createpr.sh
Created July 10, 2017 17:45
Script for creating PR on VSTS (used in SourceTree as a custom action)
#!/bin/bash
targetBranch="master"
origin=$(git remote get-url origin)
branch=$(git rev-parse --abbrev-ref HEAD)
prurl="$origin/pullrequestcreate?sourceRef=$branchName&targetRef=$targetBranch"
open $prurl

Keybase proof

I hereby claim:

  • I am peterj on github.
  • I am peterj (https://keybase.io/peterj) on keybase.
  • I have a public key ASBVqcnsOsFuaLoqTSmaYjbWPbnfJ0hcBMnasetTKZPivwo

To claim this, I am signing this object:

const STRIPE_KEY="sk_test_STRIPE_KEY";
const configureStripe = require('stripe');
const stripe = configureStripe(STRIPE_KEY);
stripe.charges.create(req.body, function (err, res) {
if (err) {
context.res = { status: 400, body: err};
} else {
context.res = { status: 200, body: res };
}
const stripe = require('stripe')('sk_STRIPE_KEY');
stripe.charges.create({
description: 'charge description',
source: 'token_id',
currency: 'USD',
amount: 999
}, (err, res) => {
// send success/error response back
});
<ul>
</nav>
</dl>
aliqua. Ut
uat.</dd>
<ul>
aliqua. Ut </dl>
@peterj
peterj / Link.js
Last active December 28, 2017 20:34
Link.js file for the tutorial
import React, { Component } from 'react';
import LinkList from './components/LinkList';
class App extends Component {
render() {
return <LinkList />;
}
}
export default App;
import React, { Component } from 'react';
import Link from './Link';
import gql from 'graphql-tag';
import { graphql } from 'react-apollo';
const ALL_LINKS_QUERY = gql`
query AllLinksQuery {
allLinks {
id