Skip to content

Instantly share code, notes, and snippets.

View bitnom's full-sized avatar
💭
forever building

bitnom bitnom

💭
forever building
View GitHub Profile
@bitnom
bitnom / install_bitcoin.sh
Last active June 5, 2018 09:54
Install Bitcoin Node (CentOS 7)
#!/bin/bash
# Adapted from: https://www.ndchost.com/wiki/how-to-install-bitcoin-on-centos-7
BITCOIN_TAG="v0.16.0"
# Install the EPEL repository
sudo yum install -y epel-release
# Install requirements/dependencies
@bitnom
bitnom / btcusd.csv
Created April 12, 2019 16:50
BTCUSD CSV
Date Open High Low Close Adj Close Volume
2017-11-29 9751.5 9992.5 9607.5 9938 9938 1236953894
2017-11-30 9938 11489 8830 9869.5 9869.5 3490469446
2017-12-01 9869.5 10750.5 8938.5 9960 9960 2291590521
2017-12-02 9960 10988 9347.5 10879.5 10879.5 1948017516
2017-12-03 10879.5 11262.5 10676.5 10910.5 10910.5 1389465247
2017-12-04 10910.5 11896 10402 11210 11210 1662517142
2017-12-05 11210 11685.5 10856 11682 11682 1539285527
2017-12-06 11682 11961 11451 11726 11726 1165153246
2017-12-07 11726 13890.5 11724 13682 13682 2181553335
@bitnom
bitnom / tradingview-output.txt
Created April 15, 2019 01:22
TradingView Chart Output
Datafeed settings received: {"success":true,"supported_resolutions":["1","5","15","30","60","1D","1W","1M"],"supports_group_request":false,"supports_marks":false,"supports_search":true,"supports_timescale_marks":false,"exchanges":[]}
library.b2ee7224c8cc9f809bca.js:544 Symbol resolve requested: `BTC/USD`
vendors.4103ca2e65289b14aad5.js:29 Mixed Content: The page at 'https://example.com/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://saveload.tradingview.com/1.1/study_templates?client=tradingview.com&user=public_user_id'. This request has been blocked; the content must be served over HTTPS.
send @ vendors.4103ca2e65289b14aad5.js:29
ajax @ vendors.4103ca2e65289b14aad5.js:28
a.getStudyTemplatesList @ library.b2ee7224c8cc9f809bca.js:225
e.refreshStudyTemplateList @ library.b2ee7224c8cc9f809bca.js:293
t.componentDidMount @ restricted-toolset.bbc61138ca4ee5d2fa1c.js:15
pr @ vendors.4103ca2e65289b14aad5.js:123
fr @ vendors.4103ca2e65289b14aad5.js:122
var Gun = require('gun');
var peersAr = ['http://tensortom.com:8080/gun'];
var gun = Gun({peers: peersAr});
gun.get('mark').put({
name: "Mark",
email: "[email protected]",
});
@bitnom
bitnom / gunStoreErr.txt
Created July 7, 2019 00:25
gun local storage error
Error: EISDIR: illegal operation on a directory, read
at Object.readSync (fs.js:498:3)
at tryReadSync (fs.js:332:20)
at Object.readFileSync (fs.js:369:19)
at Object.next (/home/site/public_html/test/superPeer/node_modules/gun/lib/file.js:19:6)
at Object.next (/home/site/public_html/test/superPeer/node_modules/gun/lib/rs3.js:8:10)
at Object.next (/home/site/public_html/test/superPeer/node_modules/gun/lib/store.js:5:13)
at Function.onto [as on] (/home/site/public_html/test/superPeer/node_modules/gun/gun.js:197:41)
at Function.Gun.create (/home/site/public_html/test/superPeer/node_modules/gun/gun.js:686:10)
at new Gun (/home/site/public_html/test/superPeer/node_modules/gun/gun.js:654:15)
@bitnom
bitnom / gundbfileErr.txt
Created July 7, 2019 00:40
Gun db as file error
SSL Peers:
Peers:
in msg:{"put":{"tom":{"_":{"#":"tom",">":{"name":1562445284408,"occupation":1562445284408}},"name":"tom","occupation":"engineer"}},"#":"4vacfvlnv9v","##":-2111997827}.........
out msg:{"put":{"tom":{"_":{"#":"tom",">":{"name":1562445284408,"occupation":1562445284408}},"name":"tom","occupation":"engineer"}},"#":"4vacfvlnv9v","##":-2111997827}.........
in msg:{"@":"4vacfvlnv9v","err":null,"ok":1,"#":"sswJgBuXP"}.........
out msg:{"@":"4vacfvlnv9v","err":null,"ok":1,"#":"sswJgBuXP"}.........
SSL Peers: lfvsmsoIa
Peers:
ERROR: { [Error: ENOTDIR: not a directory, open '/home/site/public_html/test/superPeer/localBase/thedb/%1C']
errno: -20,
@bitnom
bitnom / combo.js
Created July 7, 2019 00:41
Gun HTTP/HTTPS experiment
const path = require('path');
const express = require('express');
var fs = require('fs')
var https = require('https')
var http = require('http')
const Gun = require('gun');
const SEA = require("gun/sea");
require("gun/lib/webrtc");
const port = (process.env.PORT || 8080);
@bitnom
bitnom / superNode.js
Last active January 28, 2021 08:58
Troubleshooting Gun localStorage
const path = require('path');
const express = require('express');
var fs = require('fs')
var https = require('https')
var http = require('http')
const Gun = require('gun');
const SEA = require("gun/sea");
require("gun/lib/webrtc");
const port = (process.env.PORT || 8080);
@bitnom
bitnom / node-pre-gyp_error.log.txt
Created July 8, 2019 02:09
node-pre-gyp full log
0 info it worked if it ends with ok
1 verbose cli [ '/home/user/.nvm/versions/node/v11.6.0/bin/node',
1 verbose cli '/home/user/.nvm/versions/node/v11.6.0/bin/npm',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'webcat' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 5b5ab164cf613802
5 silly install loadCurrentTree
@bitnom
bitnom / sdp1.json
Created July 9, 2019 00:52
SDP-experiment-1
#offer was created
{"type":"offer","sdp":"v=0\r\no=- 1757076532130201660 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0\r\na=msid-semantic: WMS\r\nm=application 9 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\na=ice-ufrag:ayhN\r\na=ice-pwd:wSlLKaiyFy9Z3I+YBq0JbDf6\r\na=ice-options:trickle\r\na=fingerprint:sha-256 B2:93:08:8A:C5:49:1D:B4:53:1E:00:B4:ED:48:2A:03:8C:77:6E:BA:A8:52:3D:B1:EB:0D:CA:43:6F:B1:08:0D\r\na=setup:actpass\r\na=mid:0\r\na=sctpmap:5000 webrtc-datachannel 1024\r\n"}
#response was sent
{"type":"answer","sdp":"v=0\r\no=- 8436459379733692345 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0\r\na=msid-semantic: WMS\r\nm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\nc=IN IP4 0.0.0.0\r\nb=AS:30\r\na=ice-ufrag:aaRr\r\na=ice-pwd:k4O6SwMSygQOf1zTh/W1YG3S\r\na=ice-options:trickle\r\na=fingerprint:sha-256 F6:DE:8C:08:E5:1A:EB:8E:50:16:C4:2C:CC:AD:A8:B3:8A:35:2A:4C:BB:1E:99:19:03:0E:FE:B7:06:88:C9:75\r\na=setup:active\r\na=mid:0\r\na=sctp-port:5000\r\n"}
# No public IP in any of that? Some