Skip to content

Instantly share code, notes, and snippets.

@ChristopherBiscardi
ChristopherBiscardi / styles.css
Created May 10, 2020 22:07
How to create rainbow links
a {
background-image: linear-gradient(90deg, rgba(251, 89, 74, 1) 0%, rgba(251, 222, 75, 1) 25%, rgba(112, 228, 112, 1) 50%, rgba(51, 183, 255, 1) 75%);
-webkit-background-clip: text;
-webkit-text-fill-color: rgba(255, 255, 255, 0.46);
}
@ChristopherBiscardi
ChristopherBiscardi / links.md
Last active August 11, 2020 02:54
Sector, MDX, etc Links
{
"baseUrl": "https://cjb.dev",
"private": true,
"scripts": {
"shorten": "netlify-shortener"
},
"author": "Chris Biscardi <chris@christopherbiscardi.com> (http://christopherbiscardi.com/)",
"license": "MIT",
"devDependencies": {
"netlify-shortener": "^1.0.4"
@ChristopherBiscardi
ChristopherBiscardi / main.pony
Created December 12, 2019 02:41
ponylang aoc error example
use "collections"
use "debug"
actor Main
let input: List[ILong]
let opInput: ILong = 1
var opModes: Array[USize] = []
var position: USize = 0
var parameter: USize = 0
var opcode: ILong = 0 // initial value. invalid opcode
yw() {
yarn workspace $(yarn workspaces info --json | jq '.data' -r | jq "[keys][0] []" -r | fzf) $@
}
@ChristopherBiscardi
ChristopherBiscardi / change-to-schema-schema.js
Last active August 10, 2019 21:38
draft deletion stuff
const groupChildNodesByType = ({ nodeStore, nodes }) =>
console.log(nodes) || console.log('\n\n') ||
_(nodes)
.flatMap(node => (node.children || []).map(nodeStore.getNode))
.groupBy(node => (node.internal ? node.internal.type : undefined))
.value()
@ChristopherBiscardi
ChristopherBiscardi / yarn-workspace.sh
Last active November 22, 2019 20:05
yarn workspace command
# yw develop
yw() {
yarn workspace $(yarn workspaces info --json | jq '.data' -r | jq "[keys][0] []" -r | fzf) $@
}
@ChristopherBiscardi
ChristopherBiscardi / gatsby-node.js
Created May 21, 2019 00:56
gatsby themes component shadowing delete file hot reload
const GatsbyThemeComponentShadowingResolverPlugin = require(`.`);
exports.onCreateWebpackConfig = ({
store,
stage,
getConfig,
rules,
loaders,
actions
@ChristopherBiscardi
ChristopherBiscardi / index.js
Created May 14, 2019 22:23
MDX render in node script
const mdx = require("@mdx-js/mdx");
const { MDXProvider, mdx: createElement } = require("@mdx-js/react");
const vm = require("vm");
const { transform } = require("@babel/core");
const React = require("react");
const { renderToStaticMarkup } = require("react-dom/server");
const content = `# some markdown
content
fetch("https://graphql-demo.azurewebsites.net?query={devices{id}}").then(v => v.json()).then(v => console.log(v))