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
\timing | |
\pset null 'NULL' | |
\pset linestyle unicode | |
\pset format wrapped | |
\pset border 1 | |
\pset pager off | |
\x auto |
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
-bash-4.1$ cat /usr/local/bin/pause_replication.sh | |
/opt/PostgreSQL/9.2/bin/psql -U postgres -c 'select pg_xlog_replay_pause();' | |
/opt/PostgreSQL/9.2/bin/psql -U postgres -c 'select now() - pg_last_xact_replay_timestamp() AS replication_delay;' | |
-bash-4.1$ cat /usr/local/bin/resume_replication.sh | |
/opt/PostgreSQL/9.2/bin/psql -U postgres -c 'select pg_xlog_replay_resume();' | |
/opt/PostgreSQL/9.2/bin/psql -U postgres -c 'select now() - pg_last_xact_replay_timestamp() AS replication_delay;' |
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
const soap = require('soap'); | |
const url = 'https://partnerweb.sveaekonomi.se/WebPayAdminService_Test/AdminService.svc?wsdl'; | |
soap.createClient(url, (err, client) => { | |
client.setSecurity(new soap.BasicAuthSecurity('finlandtest2', 'finlandtest2')) | |
client.GetClientId({ SveaOrderId: 1075538 }, (err, result) => { | |
console.log(err) | |
console.log(result) | |
console.log(client.lastRequest) | |
}) |
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
<?php | |
$xml = "<?xml version='1.0'?> | |
<checkout> | |
<identification> | |
<merchant>375917</merchant> | |
<stamp>9191919191999</stamp> <!-- Unique ID for each request --> | |
</identification> | |
<message> | |
<refund> |
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
<?php | |
class Checkout | |
{ | |
private $version = "0001"; | |
private $language = "FI"; | |
private $country = "FIN"; | |
private $currency = "EUR"; | |
private $device = "1"; | |
private $content = "1"; | |
private $type = "0"; |
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 | |
# Stop all containers | |
docker stop $(docker ps -a -q) | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
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
(defn getPromiseFn | |
[aPromise] | |
(fn [num] (Thread/sleep 10000) | |
(deliver aPromise (str num " done")))) | |
(def proms [(promise) (promise) (promise)]) | |
(def promFns (map getPromiseFn proms)) | |
(future (map deref proms)) | |
(future (map promFn (range 0 (count proms)))) |
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
" Don't try to be vi compatible | |
set nocompatible | |
" Helps force plugins to load correctly when it is turned back on below | |
filetype off | |
" TODO: Load plugins here (pathogen or vundle) | |
" Turn on syntax highlighting | |
syntax on |
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
(dlv) print request | |
*struct net/http.Request { | |
Method: "POST", | |
URL: *struct net/url.URL { | |
Scheme: "", | |
Opaque: "", | |
User: *struct net/url.Userinfo nil, | |
Host: "", | |
Path: "/counts", | |
RawPath: "", |
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
HTTP GET http://bundler.rubygems.org/api/v1/dependencies | |
HTTP 301 Moved Permanently | |
HTTP GET https://app_servers/api/v1/dependencies | |
SocketError: Failed to open TCP connection to app_servers:443 (getaddrinfo: nodename nor servname provided, or not known) |