Skip to content

Instantly share code, notes, and snippets.

View CodeOfficer's full-sized avatar

Russell Jones CodeOfficer

View GitHub Profile
@CodeOfficer
CodeOfficer / firestore.rules
Created September 1, 2021 16:08 — forked from pfiadDi/firestore.rules
Firestore Advanced Security Rules
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
function isAuthenticated() {
return request.auth != null;
}
function isDefined(field) {
return field in request.resource.data
@CodeOfficer
CodeOfficer / cloudSettings
Last active November 7, 2021 20:23
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-11-07T20:23:16.167Z","extensionVersion":"v3.4.3"}
import Controller from '@ember/controller';
import { computed, set } from '@ember/object';
import { later } from '@ember/runloop';
import { tracked } from '@glimmer/tracking';
export default class ApplicationController extends Controller {
@tracked _cart = null;
@computed('cart')
get outputDude() {
// eslint-disable-next-line no-unused-vars
import { timestamp, files, shell, routes } from '@sapper/service-worker';
const ASSETS = `cache${timestamp}`;
// `shell` is an array of all the files generated by the bundler,
// `files` is an array of everything in the `static` directory
const to_cache = shell.concat(files);
const cached = new Set(to_cache);
echo code --install-extension
code --install-extension aaron-bond.better-comments
code --install-extension alefragnani.project-manager
code --install-extension ardenivanov.svelte-intellisense
code --install-extension cbuelter.vscode-toggle-max-editor
code --install-extension christian-kohler.path-intellisense
code --install-extension DavidAnson.vscode-markdownlint
code --install-extension dbaeumer.vscode-eslint
code --install-extension donjayamanne.githistory
code --install-extension dracula-theme.theme-dracula
{"lastUpload":"2020-08-13T16:51:00.817Z","extensionVersion":"v3.4.3"}
@CodeOfficer
CodeOfficer / Game-parse.js
Last active March 6, 2020 17:39
Parse PS4 game data
// vist https://store.playstation.com/en-us/home/games
// look at localstorage
// copy your entitlements data and substitue for GAME_DATA below
const games = GAME_DATA;
const sortedGames = games.sort(function(a, b) {
var textA = a.game_meta.name.toUpperCase();
var textB = b.game_meta.name.toUpperCase();
return (textA < textB) ? -1 : (textA > textB) ? 1 : 0;
@CodeOfficer
CodeOfficer / dad-jokes.js
Last active August 12, 2018 18:19
Dad Jokes
const dadJokes = {
random() {
return this.jokes[Math.floor(Math.random() * this.jokes.length)];
},
jokes: [
"Did you hear about the restaurant on the moon? Great food, no atmosphere.",
"What do you call a fake noodle? An impasta.",
"How many apples grow on a tree? All of them.",
"Want to hear a joke about paper? Nevermind, it's tearable.",
"I just watched a documentary about beavers. It was the best dam show I've ever seen.",

Keybase proof

I hereby claim:

  • I am codeofficer on github.
  • I am codeofficer (https://keybase.io/codeofficer) on keybase.
  • I have a public key whose fingerprint is E210 A1C5 3588 530F 8660 B063 F260 F399 D9C9 3D38

To claim this, I am signing this object: