This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'lib/XeroOAuth.php'; | |
define ( 'BASE_PATH', dirname(__FILE__) ); | |
define ( "XRO_APP_TYPE", "Private" ); | |
define ( "OAUTH_CALLBACK", "oob" ); | |
$useragent = "XeroOAuth-PHP Private App Test"; | |
$signatures = array ( | |
'consumer_key' => '1JEYWPUR43TZRLNDVQRAA1OPRD5DET', | |
'shared_secret' => 'IWYELLDUQLWMXU7AO7GUZFOMITXNB4', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addAccounts($Account) { | |
$Account->HasErrors(); | |
$xml = $Account->printAccount(); | |
$response = $this->token->XeroOAuth->request('PUT', $this->token->XeroOAuth->url('Accounts', 'core'), array(), $xml); | |
if ($this->token->XeroOAuth->response['code'] == 200) { | |
$accounts = $this->token->XeroOAuth->parseResponse($this->token->XeroOAuth->response['response'], $this->token->XeroOAuth->response['format']); | |
return $accounts->Accounts; | |
} else { | |
$this->token->outputError($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Xero = new xeroActions(xeroFactory::Connection(XeroConnectionType::XeroPublic)); | |
$accounts = $Xero->getAccounts("Code = \"200\""); | |
function getAccounts($filter) { | |
$response = $this->token->XeroOAuth->request('GET', $this->token->XeroOAuth->url('Accounts', 'core'), array('Where' => $filter)); | |
if ($this->token->XeroOAuth->response['code'] == 200) { | |
$accounts = $this->token->XeroOAuth->parseResponse($this->token->XeroOAuth->response['response'], $this->token->XeroOAuth->response['format']); | |
return $accounts->Accounts; | |
} else { | |
$this->token->outputError($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports Xero.Api.Infrastructure.Interfaces | |
Imports System.Security.Cryptography.X509Certificates | |
Imports Xero.Api.Infrastructure.OAuth.Signing | |
Imports Xero.Api.Infrastructure.OAuth | |
Imports Xero.Api.Core | |
Public Class clsXeroConn | |
Public _api As XeroCoreApi | |
Public Sub New(ByVal certificateFile As String, ByVal xeroKey As String, ByVal xeroPass As String, ByVal userString As String) | |
Dim _privateAuth As New PrivateAuthenticator(certificateFile, xeroPass) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Simple SHELL script for Linux and UNIX system monitoring with | |
# ping command | |
# ------------------------------------------------------------------------- | |
# Copyright (c) 2006 nixCraft project <http://www.cyberciti.biz/fb/> | |
# This script is licensed under GNU GPL version 2.0 or above | |
# ------------------------------------------------------------------------- | |
# This script is part of nixCraft shell script collection (NSSC) | |
# Visit http://bash.cyberciti.biz/ for more information. | |
# ------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$this->signatures['curl_ssl_cert'] = realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../core') . DIRECTORY_SEPARATOR . 'certs' . DIRECTORY_SEPARATOR . 'your_private_ssl.pem'; | |
$this->signatures['curl_ssl_password'] = 'YourPassword'; | |
$this->signatures['curl_ssl_key'] = realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../core') . DIRECTORY_SEPARATOR . 'certs' . DIRECTORY_SEPARATOR . 'private_key.pem'; | |
$this->signatures ['rsa_private_key'] = $this->private_cert; | |
$this->signatures ['rsa_public_key'] = $this->public_cert; | |
$this->XeroOAuth = new XeroOAuth(array_merge(array( | |
'application_type' => 'Partner', | |
'oauth_callback' => $this->oauth_callback, | |
'user_agent' => $this->user->Value('ID') . $this->user->Value("Email") | |
), $this->signatures)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"name":"Users","color":"Red","position":{"x":100,"y":100},"increment":true,"timestamp":true,"softdelete":false,"column":[{"name":"Diga","type":"text","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":true,"guarded":false,"visible":true,"hidden":false,"colid":"c32","order":0},{"name":"Brandkop","type":"text","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":true,"guarded":false,"visible":true,"hidden":false,"colid":"c40","order":1},{"name":"Henzard","type":"text","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":true,"guarded":false,"visible":true,"hidden":false,"colid":"c48","order":2}],"relation":[],"seeding":[]}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ini_set('display_errors', true); | |
ini_set('error_reporting', E_ALL); | |
define('OUTMARKET_APIURL', 'https://api.omkt.co/icp'); | |
// Load the OutMarket library | |
require_once('OutMarketApi.php'); | |
// Give the API your information | |
OutMarketApi::getInstance()->setConfig(array( | |
'appId' => 'b6b7757e-fcdc-4891-88fd-9175c9174bd6', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
t.NAME AS TableName, | |
i.name as indexName, | |
sum(p.rows) as RowCounts, | |
sum(a.total_pages) as TotalPages, | |
sum(a.used_pages) as UsedPages, | |
sum(a.data_pages) as DataPages, | |
(sum(a.total_pages) * 8) / 1024 as TotalSpaceMB, | |
(sum(a.used_pages) * 8) / 1024 as UsedSpaceMB, | |
(sum(a.data_pages) * 8) / 1024 as DataSpaceMB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
OlderNewer