Skip to content

Instantly share code, notes, and snippets.

View vtrifonov's full-sized avatar

Vasil Trifonov vtrifonov

View GitHub Profile
@vtrifonov
vtrifonov / postgres_queries_and_commands.sql
Created February 2, 2021 12:47 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@vtrifonov
vtrifonov / Credentials-In-Jenkins.groovy
Last active November 13, 2020 18:00
View credentials in Jenkins
def creds = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(
com.cloudbees.plugins.credentials.Credentials.class,
Jenkins.instance,
null,
null
)
for(c in creds) {
if(c instanceof com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey){
println(String.format("id=%s desc=%s key=%s\n", c.id, c.description, c.privateKeySource.getPrivateKeys()))
[{
"event": "change",
"file": "app-root.xml",
"fileContents": "<Frame defaultPage=\"home/home-page\"></Frame>\n"
}, {
"event": "change",
"file": "app.css",
"fileContents": ".btn {\n font-size: 18;\n}\n@import '~@nativescript/theme/css/core.css';\n.home-panel{\n vertical-align: center;\n font-size: 20;\n margin: 15;\n}\n.description-label{\n margin-bottom: 15;\n}"
}, {
"event": "change",
@vtrifonov
vtrifonov / HMR fail
Created September 19, 2018 13:42
HMR fail
Project successfully prepared (Android)
Executing after-prepare hook from /Users/trifonov/Work/ns-playground-templates/templates/tutorials/groceries-js/hooks/after-prepare/nativescript-dev-webpack.js
Successfully transferred bundle.js.
Refreshing application...
Successfully synced application org.nativescript.groceriesjs on device 09a3fcfc0298a33a.
ActivityManager: Start proc 21125:org.nativescript.groceriesjs/u0a529 for activity org.nativescript.groceriesjs/com.tns.NativeScriptActivity
System.err: com.tns.NativeScriptException:
System.err: Calling js method onViewAttachedToWindow failed
System.err: TypeError: Cannot read property ‘onNavigatingTo’ of undefined
System.err: File: “file:///data/data/org.nativescript.groceriesjs/files/app/vendor.js, line: 20086, column: 36
base-strategy Start strategy "Strategy3" +0ms
base-strategy {"message":"Created a new limit order object. Ready to place it.","id":2,"secId":"ETH","symbol":"ETH-EUR","amount":0.011,"price":"698.99","isFuture":false,"type":"buy","status":"new","createdAt":"2018-02-23T18:37:08.234Z","marketOrder":false,"filled":0} +3s
gdax-trader place new order: {"id":2,"secId":"ETH","symbol":"ETH-EUR","amount":0.011,"price":"698.99","isFuture":false,"type":"buy","status":"new","createdAt":"2018-02-23T18:37:08.234Z","marketOrder":false,"filled":0,"exchange":"gdax"}} +0ms
gdax-private submitting order +0ms
gdax A new order came: [object Object] +0ms
base-strategy {"message":"On Trade Update at 2018-02-23T18:37:08.869Z","id":3,"secId":"ETH","symbol":"ETH-EUR","amount":"0.01100000","price":"698.99000000","isFuture":false,"type":"buy","status":"Unknown","createdAt":"2018-02-23T18:37:08.869Z","marketOrder":false,"filled":0} +633ms
gdax-private order submitted: d90a5078-81e5-4f95-a5ec-484ddf374636 +680ms
base-strateg
okex connection failed error: Error: connect ECONNREFUSED 47.90.109.236:10441, {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect","address":"47.90.109.236","port":10441}, Error: connect ECONNREFUSED 47.90.109.236:10441
okex at Object._errnoException (util.js:1022:11)
okex at _exceptionWithHostPort (util.js:1044:20)
okex at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14) +4m
okex retrying time: 1 at Wed Feb 21 2018 03:11:12 GMT+0800 (CST) +2ms
okex connected +2s
okex-private Spot: connected to Order channel for btc_usdt +4m
okex connected +51s
okex received message from unsubscribed channel: ok_sub_spot_btc_usdt_balance. Message: {"info":{"free":{"usdt":273.026169326586},"freezed":{"usdt":104.8}}} +623ms
okex Warning: Received message without a channel: {"base":"btc","binary":1,"data":{"modifyTime":1519153926933,"createTime":1515724161000,"available":"273.026169326586","withdrawLimit":"-1","currencyId":7,"userId":7135188,"hold":"104.8"},"product$
okex Warning: Received message without a channel: {"base":"btc","binary":1,"data":{"modifyTime":1519077946337,"createTime":1515724161000,"available":"277.726169326586","withdrawLimit":"-1","currencyId"$7,"userId":7135188,"hold":"100.1"},"product":"spot","quote":"usdt","type":"balance"} +1ms
okex received message from unsubscribed channel: ok_sub_spot_btc_usdt_balance. Message: {"info":{"free":{"usdt":277.726169326586},"freezed":{"usdt":100.1}}} +1ms
okex received message from unsubscribed channel: ok_sub_spot_btc_usdt_order. Message: {"symbol":"btc_usdt","tradeAmount":"0.01000000","createdDate":"1519077946327","orderId":278861036,"completedTradeAm$unt":"0.00000000","averagePrice":"0","tradePrice":"0.0000","tradeType":"buy","status":0,"tradeUnitPrice":"10010.0000"} +0ms
okex Warning: Received message without a channel: {"base":"btc","binary":1,"data":{"orderType":0,"symbol":"btc_usdt","side":1,"quoteSize":"0.0000","executedValue":"0.0000","source":0,"userId":7135188,"$odifyTime":1519077946327,"size":"0
okex connected +5m
okex connected +5m
okex connected +5m
okex connected +5m
okex connected +5m
okex connected +5m
okex connected +5m
okex connected +5m
bfx reconnecting +1h
bfx close +1s