Skip to content

Instantly share code, notes, and snippets.

View benawad's full-sized avatar

Ben Awad benawad

View GitHub Profile
// I'm trying to get paths with clip-rule to work. Example:
// <path fill-rule="evenodd" clip-rule="evenodd" d="M148 62.5C148" />
// this works
const p = Skia.Path.MakeFromSVGString(`<path fill-rule="evenodd" clip-rule="evenodd" d="M148 62.5C148" />`)
const frame0 = {
props: {
"fillRule": "evenodd",
"clipRule": "evenodd",
import { produce } from "immer";
import { ApolloCache } from "@apollo/client";
export const updateQuery = (
store,
query,
fn,
variables
) => {
let data;
steps:
- uses: actions/checkout@v2
- run: yarn install
- run: yarn test
- run: yarn build
# make sure to add netlify-cli in your package.json
- name: Send to Netlify
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
steps:
- uses: actions/checkout@v2
- run: yarn install
- run: yarn test
- run: yarn docker:build
- run: yarn docker:login
  • JavaScript vs. TypeScript
  • Coding Interviews are great
  • Deno vs. Node
  • flutter vs react-native
  • is HTML a programming language
  • JWT vs Sessions
  • Hooks are Bad (React)
  • light mode vs dark mode
  • React is bad
  • React vs Plain HTML/Vanilla Javascript

Dev Debate - debating viewers on tech topics

rules

  1. We agree on a topic
  2. I debate someone for a max of 30 minutes
  3. At the end of Twitch chat votes who won

possible topics - suggestions welcome

1. pair programming
3. coding an interesting project (doesn't work), but demoing one will
5. clash of coding or some kind go coding game
6. try to teach __any_famous_twitch_streamer__ to code (problem is getting one of them interested)
7. collab with coding train + coding garden
Top tier coding streams ATM
+2,000
- Michael Reeves
function clickAccept() {
document.querySelectorAll('button.artdeco-button--secondary').forEach(b => {
if (b.innerText.includes('Accept')) {
b.click()
}
});
}
function loadMore() {
document.querySelector('button.artdeco-button--icon-right').click()
@benawad
benawad / web-deploy.yml
Created March 28, 2020 02:45
Github Action for deploying https://www.mysaffronapp.com/ website
name: web-deploy
on:
push:
tags:
- "web-*"
- "both-*"
jobs:
landing:
@benawad
benawad / [slug].js
Created March 24, 2020 15:39
ssg + mdx next.js
import fs from "fs";
import MDX from "@mdx-js/runtime";
import ReactDOM from "react-dom/server";
import path from "path";
const Post = ({ post }) => {
return <div dangerouslySetInnerHTML={{ __html: post }} />;
};
export async function getStaticPaths() {