Skip to content

Instantly share code, notes, and snippets.

View joemccann's full-sized avatar
💭
Thinking

Joe McCann joemccann

💭
Thinking
View GitHub Profile
import pandas as pd
from bokeh.plotting import figure, show
from bokeh.models import NumeralTickFormatter, HoverTool
from bokeh.models import LinearAxis, Range1d
import yfinance as yf
# ---------------------------------------------------------------------
df = treasury_gov_pandas.update_records(
curl http://api.mainnet-beta.solana.com -X POST -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getProgramAccounts",
"params": [
"cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ",
{
"encoding": "jsonParsed",
"filters": [ ]
}
@IanColdwater
IanColdwater / twittermute.txt
Last active March 6, 2024 18:49
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@prdn
prdn / bfx_pub_shard.js
Last active August 30, 2018 08:11
Bitfinex Public Market Data sharding on multiple sockets
/*
npm install ws request crc-32
*/
const WebSocket = require('ws')
const request = require('request')
const CRC = require('crc-32')
const LIMIT_CHAN = 250
@jeromecoupe
jeromecoupe / webstoemp-gulpfile.js
Last active January 21, 2024 16:28
Gulp 4 sample gulpfile.js. For a full explanation, have a look at https://www.webstoemp.com/blog/switching-to-gulp4/
"use strict";
// Load plugins
const autoprefixer = require("autoprefixer");
const browsersync = require("browser-sync").create();
const cp = require("child_process");
const cssnano = require("cssnano");
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");
@oyvindholmstad
oyvindholmstad / schema-generator.js
Last active September 21, 2018 06:54
BigQuery JSON schema generator in Javascript and Scala
/*
A script to generate a Google BigQuery-complient JSON-schema from a JSON object.
Make sure the JSON object is complete before generating, null values will be skipped.
References:
https://cloud.google.com/bigquery/docs/data
https://cloud.google.com/bigquery/docs/personsDataSchema.json
https://gist.github.com/igrigorik/83334277835625916cd6
... and a couple of visits to StackOverflow

Notes:

  • Text in [[ ]] are the internal libuv function call.
  • Text in {{ }} are the Node functions that are affected.
  • Text in ( ) are notes about what is happening.
  • While the Windows event loop has minor variations, I don't believe any of those affect Node.

On process.nextTick():

@trevnorris
trevnorris / perf-flame-graph-notes.md
Last active December 24, 2023 05:25
Quick steps of how to create a flame graph using perf

The prep-script.sh will setup the latest Node and install the latest perf version on your Linux box.

When you want to generate the flame graph, run the following (folder locations taken from install script):

sudo sysctl kernel.kptr_restrict=0
# May also have to do the following:
# (additional reading http://unix.stackexchange.com/questions/14227/do-i-need-root-admin-permissions-to-run-userspace-perf-tool-perf-events-ar )
sudo sysctl kernel.perf_event_paranoid=0
@juliangruber
juliangruber / gist:7356251
Last active May 5, 2021 17:53
localhost subdomains on osx

First, install dnsmasq using brew:

$ brew update
$ brew install dnsmasq

Then create your configuration