Skip to content

Instantly share code, notes, and snippets.

@ib0b
ib0b / checkSync.js
Created January 26, 2022 19:20
Track BSC node sync status
//checks if local noded is sync then sends SMS message using Twillio
document.title = "Sync Watcher"
const Web3 = require("web3")
const net = require('net');
const state = {
messageSent: false,
watcherInterval: null,
lastSyncStatus: null,
previousStatuses: [0, 0, 0],
@ib0b
ib0b / depthcache.js
Created August 28, 2020 09:02
Websockets Depth Cache for Binance
var WebSocket = require('ws');
var ws;
var depthCache = {}
function connect() {
ws = new WebSocket("wss://fstream.binance.com/ws/bnbusdt@depth@0ms");
ws.on('open', function open() {
ws.send('something');
});
@ib0b
ib0b / twitter unfollow.js
Created May 9, 2020 21:03
Twitter Unfollow Script
var start = 1
var num = 100 + start
//go to your following page on any brower
//run in console
const sleep = time => new Promise(resolve => setTimeout(resolve, time))
async function unfollow() {
try {
@ib0b
ib0b / ass2.c
Created February 26, 2019 11:14
assignemnt 1
#include <stdio.h>
#include <stdlib.h>
typedef int bool;
enum { false, true };
int main()
{
char name[50];
@ib0b
ib0b / index.html
Created December 11, 2018 15:24
Electron Fiddle Gist
<!DOCTYPE html>
<html>
<head>
<!-- Insert this line above script imports -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<!-- normal script imports etc -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
@ib0b
ib0b / index.html
Created December 11, 2018 14:28
Electron Fiddle Gist
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
<!-- All of the Node.js APIs are available in this renderer process. -->
We are using Node.js <script>document.write(process.versions.node)</script>,
@ib0b
ib0b / index.html
Created December 11, 2018 14:19
Electron Fiddle Gist
<!DOCTYPE html>
<html>
<head>
<!-- Insert this line above script imports -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<!-- normal script imports etc -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
@ib0b
ib0b / index.html
Created December 11, 2018 14:18
Electron Fiddle Gist
<!DOCTYPE html>
<html>
<head>
<!-- Insert this line above script imports -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<!-- normal script imports etc -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
@ib0b
ib0b / index.html
Created December 11, 2018 14:14
Electron Fiddle Gist
<!DOCTYPE html>
<html>
<head>
<!-- Insert this line above script imports -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<!-- normal script imports etc -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
@ib0b
ib0b / index.html
Last active December 11, 2018 14:14
Electron Fiddle Gist
<!DOCTYPE html>
<html>
<head>
<!-- Insert this line above script imports -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<!-- normal script imports etc -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>