Skip to content

Instantly share code, notes, and snippets.

View GregPK's full-sized avatar

Grzegorz Kaczorek GregPK

View GitHub Profile
@GregPK
GregPK / FileUploadComponent.jsx
Created May 22, 2017 07:32 — forked from github0013/FileUploadComponent.jsx
how to upload files using graphql + apollo client
class FileUploadComponent extends Component{
upload(){
this.props.mutate({
variables: {
id,
avatar: this.inputFile.files[0] //this is how you send file
}
}).
then(({data}) => {
console.log(data)
@GregPK
GregPK / CopyAsanaProjects.php
Last active December 22, 2015 08:49 — forked from AWeg/CopyAsanaTasks.php
This utility class allows you to copy projects from one workspace in Asana to another. Shortcomings: * any tasks that have been set up as recurring will not preserve that setting (a limitation of the Asana API)
<?php
class CopyAsanaWorkspace
{
public $apiKey; /// Get it from http://app.asana.com/-/account_api
public $indentationLevel = 0;
public $verbose = true;
private $projectFields = array('name','color','notes');