Skip to content

Instantly share code, notes, and snippets.

View Friss's full-sized avatar
:shipit:
just ship it

Zachary Friss Friss

:shipit:
just ship it
View GitHub Profile
{
"color_scheme": "Packages/User/base16-eighties.dark (SL).tmTheme",
"ensure_newline_at_eof_on_save": true,
"font_family": "Source Code Pro",
"font_size": 10,
"highlight_line": true,
"ignored_packages":
[
"SublimeLinter-html-tidy",
"HTML-CSS-JS Prettify",
### Keybase proof
I hereby claim:
* I am friss on github.
* I am friss (https://keybase.io/friss) on keybase.
* I have a public key ASCvIHjTP2pk4aQCoO53ii43FUY19PU2A2YTsCvjWPPhCAo
To claim this, I am signing this object:
@Friss
Friss / error-test.js
Last active September 2, 2020 13:40
Apollo error test
var express = require('express');
var bodyParser = require('body-parser');
var apolloServerExpress = require('apollo-server-express');
var {graphqlExpress, graphiqlExpress} = apolloServerExpress;
var makeExecutableSchema = require('graphql-tools').makeExecutableSchema;
var typeDefs = `
type Query {
testString: String
@Friss
Friss / csgoconf.cfg
Created February 27, 2019 04:38
csgo twitch extension
"Observer All Players v.1"
{
"uri" "http://127.0.0.1:3000"
"timeout" "0.5"
"buffer" "0.5"
"throttle" "1.0"
"heartbeat" "10.0"
"auth"
{
"token" "Q79v5tcxVQ8ud"
/* This uses a modified version of puppeteer-to-istanbul and v8-to-istanbul */
// There are a lot of diffs here but most of it is just prettier changes :(
// https://github.com/istanbuljs/puppeteer-to-istanbul/compare/master...Friss:master
// Mostly just converting it to handle the new async v8-to-istanbul code. Also fetches sourcemaps if availabile.
// https://github.com/istanbuljs/v8-to-istanbul/compare/source-maps...Friss:source-maps
// Tweaks to parse the path out to webpack files that I recreated based on the source maps.
@Friss
Friss / index.js
Created November 12, 2019 06:54
Example way to run lighthouse cli with auth
const fs = require("fs").promises;
const util = require("util");
const exec = util.promisify(require("child_process").exec);
const puppeteer = require("puppeteer");
const PORT = 8041;
(async () => {
// Direct Puppeteer to open Chrome with a specific debugging port.
const cookieString = 'testCookie'
const fs = require('fs').promises;
(async () => {
console.log(`Reading input from ${__dirname}/${process.argv[2]}.txt`);
const inputData = await fs.readFile(`${__dirname}/${process.argv[2]}.txt`);
const inputs = inputData.toString().split('\n\n');
const neededFields = [
{
string: 'byr',
const fs = require('fs').promises;
(async () => {
console.log(`Reading input from ${__dirname}/${process.argv[2]}.txt`);
const inputData = await fs.readFile(`${__dirname}/${process.argv[2]}.txt`);
const inputs = inputData
.toString()
.split('\n')
.filter((n) => n);
const fs = require('fs').promises;
(async () => {
console.log(`Reading input from ${__dirname}/${process.argv[2]}.txt`);
const inputData = await fs.readFile(`${__dirname}/${process.argv[2]}.txt`);
const inputs = inputData
.toString()
.split('\n\n')
.filter((b) => b);
const fs = require('fs').promises;
(async () => {
console.log(`Reading input from ${__dirname}/${process.argv[2]}.txt`);
const inputData = await fs.readFile(`${__dirname}/${process.argv[2]}.txt`);
const inputs = inputData
.toString()
.split('\n')
.filter((n) => n);