Skip to content

Instantly share code, notes, and snippets.

View .zshrc-backup
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/frankg/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="robbyrussell"
View zsh custom
###########################################################
## CUSTOM ZSH CONFIG FOR FRANKG
## ALIASES
## EDITOR
alias vs='code'
## CUSTOM_ZSH
CUSTOM_ZSH=~/.zsh_custom/zsh_custom
@dearfrankg
dearfrankg / none
Created Jan 23, 2019
vs-code config
View none
{
// workbench
"window.zoomLevel": 1,
"workbench.colorTheme": "DesertEx",
"workbench.iconTheme": "vscode-icons",
"workbench.fontAliasing": "antialiased",
"workbench.startupEditor": "newUntitledFile",
"debug.toolBarLocation": "docked",
// file explorer
"explorer.openEditors.visible": 0,
View .gitconfig
[credential]
helper = osxkeychain
useHttpPath = true
#
# GIT CONFIG FILE`
#
## GATHER FROM ONLINE: https://goo.gl/2knYDc
@dearfrankg
dearfrankg / query.sql
Created Dec 17, 2018
SQL Query Question
View query.sql
/* return highest salary, employee name, deparment name for each department */
/*
+----------------------+
| Tables_in_employees |
+----------------------+
| current_dept_emp |
| departments |
@dearfrankg
dearfrankg / components GithubRepos.js
Last active Nov 16, 2018
intro-to-next-part2 -- mock data
View components GithubRepos.js
...
import { MOCK_URL } from "../mock/config.json";
const API_URL = MOCK_URL
? MOCK_URL
: `https://api.github.com/search/repositories?q=stars:>1+language:javascript&sort=stars&order=desc&type=Repositories`;
...
@dearfrankg
dearfrankg / mock config.json
Created Nov 16, 2018
intro-to-next-part2 -- mock data
View mock config.json
{
"MOCK_URL": "http://localhost:3333/search/repositories"
}
@dearfrankg
dearfrankg / GithubRepos.js
Last active Nov 16, 2018
intro-to-next-part2 -- app version 2
View GithubRepos.js
import React, { Component } from "react";
import axios from "axios";
import { Table, Pane, Spinner } from "evergreen-ui";
const Repo = ({ repo, index }) => (
<Table.Row key={index} isSelectable onSelect={() => alert(repo.name)}>
<Table.TextCell>{index + 1}</Table.TextCell>
<Table.TextCell flexBasis="25vw">
<span className="repo-name">{repo.name}</span>
</Table.TextCell>
@dearfrankg
dearfrankg / components-GitubRepos.js
Last active Nov 16, 2018
intro-to-next-part2 -- app version 1
View components-GitubRepos.js
import React, { Component } from "react";
import PropTypes from "prop-types";
import axios from "axios";
const Repo = ({ repo, index }) => (
<tr>
<td>{index + 1}</td>
<td className="repo-name">{repo.name}</td>
<td>{repo.stargazers_count} Stars</td>
<style jsx>{`
@dearfrankg
dearfrankg / index.html
Created Nov 11, 2018
YouTube OAuth Access
View index.html
<script>
var GoogleAuth;
var SCOPE = "https://www.googleapis.com/auth/youtube.force-ssl";
function handleClientLoad() {
// Load the API's client and auth2 modules.
// Call the initClient function after the modules load.
gapi.load("client:auth2", initClient);
}
function initClient() {