Skip to content

Instantly share code, notes, and snippets.

💭
hi hello

juno suárez junosuarez

💭
hi hello
Block or report user

Report or block junosuarez

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View jq.sh
cat repos.json | jq '.repos | sort_by(.nameWithOwner) | .[].nameWithOwner | "https://github.com/\(.)"'
View iterm_profile.json
{
"Set Local Environment Vars" : true,
"Working Directory" : "\/Users\/jdenizac",
"Prompt Before Closing 2" : 0,
"Selected Text Color" : {
"Green Component" : 0,
"Red Component" : 0,
"Blue Component" : 0
},
"Rows" : 25,
View foo.md
\e[38;5;82mHello \e[38;5;198mWorld
\e[38;5;82mHello \e[38;5;198mWorld
\e[38;5;82mHello \e[38;5;198mWorld
@junosuarez
junosuarez / index.js
Last active Jun 21, 2019
async cli app boilerplate
View index.js
#!/usr/bin/env node
if (process.mainModule === module) setImmediate(() => main(process.argv).catch(e => console.log(e.stack) && process.exit(1)))
async function main(argv) {
console.log(argv.slice(2))
}
@junosuarez
junosuarez / index.js
Created Jun 27, 2017
non-matched shebang
View index.js
#! /usr/bin/env node
console.log((new Date().getHours()) < 12 ? 'buenos!' : 'buenas!')
View index.js
#!/usr/bin/env node
console.log((new Date().getHours()) < 12 ? 'buenos!' : 'buenas!')
@junosuarez
junosuarez / pre-commit
Created May 10, 2017
prettier git hooks
View pre-commit
#!/bin/sh
# Redirect output to stderr.
exec 1>&2
changed=$(git diff --cached --name-only)
if echo $changed | grep '.js$'; then
prettier --list-different --no-semi --single-quote --trailing-comma=none --print-width=80 $changed || echo you cant go out looking like this! 💅 ; exit 1
fi
@junosuarez
junosuarez / foo.js
Last active Dec 16, 2016
This should type check
View foo.js
// @flow
export type Locale =
| 'EN-us'
| 'ES-us'
export default class Foo {
name: string
constructor (name: string) {
@junosuarez
junosuarez / notes.md
Created Sep 16, 2016
debugging graphql-ruby
View notes.md
  1. traverse each top-level thing, depth-first. for fragments, build a stack of "spread" references to be executed later 1a. so first it gets the query operation, then the F0, F1, etc 1b. each top-level object (operation, fragment) has a tree of nodes with "selections"
  2. when it starts processing fragments, it hits a lazy reducer which enumerates all of the schema types / interfaces (FragmentWithTypeStrategy) 2a. when it enters visiting a FragmentDefinition, it pushes it on the fragments stack
  3. when it gets to a Field under a fragment, the Node:Field.enter visitor looks up that field from the parent irep node or else creates a new irep node. it pushes it on the @nodes stack, and pushes empty parent directives? is that right? at this point, the Field AST node has directives as child AST nodes, which get traversed next
  4. when it visits the Directive AST node, it makes an irep node and pushes it on the @parent_nodes stack
  5. Arguments are children of the Directive AST, which is visited next. things unwind. ba
View github.com.css
.pl-c {
color: #969896
}
.pl-c1,.pl-s .pl-v {
color: #0086b3
}
.pl-e,.pl-en {
color: #795da3
You can’t perform that action at this time.