Skip to content

Instantly share code, notes, and snippets.

View seve's full-sized avatar

Severiano Badajoz seve

View GitHub Profile
import {
Button,
Dialog,
DialogActions,
DialogContent,
DialogTitle,
} from "czifui";
<Dialog open={isOpen} onClose={handleClose}>
<DialogTitle title="API Key" />

#Refactor Plan

Change Requests to GraphQL

Maybe try and use async/await

{
repository(owner: "iruka-dev", name: "iruka") {
stargazers(first: 50) {
nodes {
login
company
repositories(last: 10) {
nodes {
name
languages(first: 3) {
{
"data": {
"viewer": {
"repositories": {
"nodes": [
{
"name": "visual-trie"
},
{
"name": "streamer-analytics"
query {
viewer {
repositories(last:5){
nodes{
name
}
}
}
}
@seve
seve / uglyCode.js
Created May 9, 2019 07:18
Code that needs refactoring
// POST: Update all of the users in the database
router.post('/', (req, res) => {
// Remove existing data
mongoose.connection.db.dropDatabase();
// Get request for all stargazers of Ikura repo
const getStargazers = octokit.activity.listStargazersForRepo.endpoint.merge({
owner: 'iruka-dev',
repo: 'iruka',
});
Remove any existing database
Ask GitHub for the stargazers of the GitHub repo 'iruka-dev/iruka'
loop over the data
  Get a GitHub user's data from GitHub
    If the user has a GitHub organization
      Format the GithHub organization name
      Create a user database entry
      Iterate over the user's GitHub repos from GitHub
 Get the repo's languages from GitHub

Remove any existing database Ask GitHub for the stargazers of the GitHub repo 'iruka-dev/iruka' loop over the data Get a user's data from GitHub If the user has a organization Format the organization name Create a user database entry Iterate over the user's repos from GitHub Get the repo's languages from GitHub Iterate over the repo's issues from GitHub

[
{
"key": "cmd+n",
"command": "-workbench.action.files.newUntitledFile"
},
{
"key": "cmd+n",
"command": "explorer.newFile"
},
{
@seve
seve / cloudSettings
Last active December 20, 2021 17:36
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-12-20T17:36:24.291Z","extensionVersion":"v3.4.3"}