Skip to content

Instantly share code, notes, and snippets.

View piotrplaneta's full-sized avatar

Piotr Płaneta piotrplaneta

View GitHub Profile
First request (you can also call for xml format, like described in docs):
curl -H "Content-Type: application/json" -H "Accept: application/json" -X POST https://sales.futuresimple.com/api/v1/authentication.json -d'{"email": "MY_EMAIL", "password": "MY_PASSWORD"}'
Response:
{"authentication":{"token":"MY_TOKEN"}}
Now i put this token in my headers like this (to get contacts, also you can specify for xml, like in docs):
curl -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Pipejump-Auth: MY_TOKEN" -H "X-Futuresimple-Token: MY_TOKEN" -X GET https://sales.futuresimple.com/api/v1/contacts.json
I receive json representation of contacts list
filepath = "../test"
def parse_input(input):
lines = input.split("\n")
parse_lines(lines[1:-2])
def parse_lines(lines):
list_container = list()
tmp_list = list()
for line in lines:
set nocompatible
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'kien/ctrlp.vim'
Bundle 'nono/vim-handlebars'
Bundle 'kchmck/vim-coffee-script'
go max lastMax [] = max
go max lastMax (x : xs)
| lastMax + x < 0 = go max 0 xs
| lastMax + x > max = go (lastMax + x) (lastMax + x) xs
| otherwise = go max (lastMax + x) xs
maxsum = go 0 0
array.inject(Hash.new { |h, k| h[k] = [] }) { |result, pair| result[pair[0]] << pair[1]; result}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package triangle;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
require 'digest/sha1'
bob_texts_c = []
mallory_texts_c = []
bob_texts = {}
mallory_texts = {}
bob_text = 'Wyplacic Bobowi 100 zlotych.'
mallory_text = 'Wyplacic Mallory 100 zlotych.'
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <sched.h>
#include <ctype.h>
#include <process.h>
#include <sys/wait.h>
int main4(int argc, char *argv[]) {