Skip to content

Instantly share code, notes, and snippets.

View freekrai's full-sized avatar

Roger Stringer freekrai

View GitHub Profile
@freekrai
freekrai / app_GraphQL_schema.json
Created March 21, 2021 17:59 — forked from 4levels/app_GraphQL_schema.json
Sample setup Lighthouse with Lumen
# Just the basics: User with Images
scalar DateTime @scalar(class: "DateTime")
type User {
id: ID! @globalId
name: String
email: String
created_at: DateTime!
updated_at: DateTime!
@freekrai
freekrai / README.md
Created March 20, 2021 15:59 — forked from ppoffice/README.md
Install Visual Studio Code (actually code-server) on Android
  1. Install Termux, an Android terminal emulator that provides a Linux execution environment and various tools.

  2. Update system packages in Termux:

    $ pkg update -y
@freekrai
freekrai / fauna-adapter.js
Created November 22, 2020 20:40 — forked from s-kris/fauna-adapter.js
faunadb adapter for next-auth for next.js
// followed from next-auth repo: https://github.com/nextauthjs/next-auth
// create faunadb server key
// create collections: users, accounts, sessions, verificationRequests
// create required indexes
import faunadb, { query as q } from 'faunadb';
import { v4 as uuidv4 } from 'uuid';
import { createHash, randomBytes } from 'crypto';
@freekrai
freekrai / .zshrc
Created November 17, 2020 16:27 — forked from callumlocke/.zshrc
ZSH function to auto-switch to correct Node version
####
# ZSH function to auto-switch to correct Node version
# https://gist.github.com/callumlocke/30990e247e52ab6ac1aa98e5f0e5bbf5
#
# - Searches up your directory tree for the closest .nvmrc, just like `nvm use` does.
#
# - If you are already on the right Node version, IT DOES NOTHING, AND PRINTS NOTHING.
#
# - Works correctly if your .nvmrc file contains something relaxed/generic,
# like "4" or "v12.0" or "stable".
@freekrai
freekrai / notion2blog.js
Created September 16, 2020 16:52 — forked from mayneyao/notion2blog.js
Notion.so > Personal Blog | custom domain + disqus comment
const MY_DOMAIN = "agodrich.com"
const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2"
const DISQUS_SHORTNAME = "agodrich"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
@freekrai
freekrai / install_ffmpeg_ubuntu.sh
Created May 14, 2020 16:48 — forked from seankross/install_ffmpeg_ubuntu.sh
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
@freekrai
freekrai / NextValetDriver.php
Created February 23, 2019 06:00 — forked from james2doyle/NextValetDriver.php
A Laravel Valet driver for running generated Next.js sites. This driver assumes you have not changed the default public path (/out) in the next.config.js
<?php
/**
* NextValetDriver for running compiled next.js sites
*/
class NextValetDriver extends BasicValetDriver
{
/**
* Determine if the driver serves the request.
*
<?
/*
This is part of the Reprise framework, not yet released publicly.
Copyright 2013 Marco Arment. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
@freekrai
freekrai / README.md
Created December 6, 2018 17:49
Go Queues

Build the application

go build -o queued *.go

Run the application

Now, to run our application, how about we start it with 2048 workers, just for kicks?

@freekrai
freekrai / Tab.css
Last active February 22, 2018 16:44 — forked from diegocasmo/Tab.js
Source code for implementing a React <Tabs/> component.
ul.tabs-nav.nav.navbar-nav.navbar-left {
margin: 0px;
padding: 0px;
list-style: none;
}
li.tab {
display: inline-block;
padding: 10px;
margin-right: 5px;