Skip to content

Instantly share code, notes, and snippets.

type User {
id: ID! @unique
sub: String! @unique
username: String
createdAt: DateTime!
updatedAt: DateTime!
email: String! @unique
name: String!
timezone: String @default(value: "America/Los_Angeles")
avatar: File @relation(name: "AvatarOwner", onDelete: CASCADE)
'use strict'
const { google } = require('googleapis')
const got = require('got')
const key = require('./auth.json')
async function loginWithJWT(){
const scopes = 'https://www.googleapis.com/auth/photoslibrary.readonly';
const jwt = new google.auth.JWT(key.client_email, null, key.private_key, scopes);
console.log('performing login')
@bfagundez
bfagundez / list-placeholder.directive.test.spec.ts
Created November 30, 2018 22:45
directive test workbench
import { TestBed, ComponentFixture } from '@angular/core/testing';
import { Component, DebugElement } from '@angular/core';
import { By } from '@angular/platform-browser';
import { ListPlaceholderDirective } from '../app/shared/directives_and_pipes/list-placeholder.directive';
@Component({
template: `<div [listPlaceholder]='listPlaceholder'>
<div #listPlaceholder>
<div class="injected-default">empty</div>
</div>
@bfagundez
bfagundez / dashbabysniff.py
Created September 15, 2018 21:14
sniff dash buttons
from __future__ import print_function
from pydhcplib.dhcp_network import *
from googleapiclient.discovery import build
from httplib2 import Http
from oauth2client import file, client, tools
from datetime import datetime
SPREADSHEET_ID = '1iiGsl0ZElGXD1p6aLFD2GB1oT39xQqV7LVqnGRjxlIc'
def append_to_spreadsheet(data):
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bfagundez
bfagundez / keymap.c
Created July 13, 2018 22:27
minidox keymap
#include "minidox.h"
#include "action_layer.h"
#include "eeconfig.h"
extern keymap_config_t keymap_config;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.

Keybase proof

I hereby claim:

  • I am bfagundez on github.
  • I am geekymartian (https://keybase.io/geekymartian) on keybase.
  • I have a public key ASApdm-Pa4IT_bG_hbjwhCNIecLOdawP6sPMSeoPTefauAo

To claim this, I am signing this object:

@bfagundez
bfagundez / tmux.conf
Created March 21, 2018 03:18
Tmux conf with powerline
source /Users/<username>/Library/Python/2.7/lib/python/site-packages/powerline/bindings/tmux/powerline.conf
set -g default-terminal "screen-256color"
set -g history-limit 15000
set -sg escape-time 1
setw -g monitor-activity on
set -g visual-activity on
set -g renumber-windows on
set-window-option -g automatic-rename off
set -g base-index 1
@bfagundez
bfagundez / nvim config
Created March 17, 2018 18:00
nvim config
" Vim Plug (this has to be the first thing on the init.vim)
call plug#begin()
Plug 'tpope/vim-sensible'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'junegunn/vim-github-dashboard'
Plug 'cloudhead/neovim-fuzzy'
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
Plug 'bling/vim-airline'
Plug 'numkil/ag.vim'
@bfagundez
bfagundez / native-routing.js
Last active March 24, 2016 18:08
react native routing with navigator
import HomePage from './app/components/anonymous/home/homepage'
import SignUp from './app/components/anonymous/signup/signup'
import Market from './app/components/authenticated/market/market'
import Shop from './app/components/authenticated/market/shop/shop'
class PackShop extends Component {
render() {
return (
<Navigator
style={{ flex:1 }}