Skip to content

Instantly share code, notes, and snippets.

Avatar
🐙
Taking it easy

Juan Carlos Medina juanca

🐙
Taking it easy
  • Mavenlink
  • San Francisco, CA
View GitHub Profile
@juanca
juanca / gist:669c59f15a17e20022b8bd78b12889e6
Created Oct 9, 2020
github_full_width.js -- responsive github because why not?
View gist:669c59f15a17e20022b8bd78b12889e6
javascript:
((n = document.getElementsByClassName('new-discussion-timeline')[0]) && (n.style['max-width'] = '90%') && false);
@juanca
juanca / pijun.rb
Created Apr 30, 2019
pair+juan-carlos
View pijun.rb
require 'set'
Set.new("pair".chars) + Set.new("juan".chars) - Set.new("carlos".chars)
# => #<Set: {"p", "i", "j", "u", "n"}>
View setup-osx.sh
if [ ! $(command -v brew) ]; then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
brew update
brew doctor
declare -a brew_apps=(
node
yarn
@juanca
juanca / github_load_all_diffs.js
Created Mar 2, 2017
Github PR bookmarklet: Load all file diffs
View github_load_all_diffs.js
javascript:
document.querySelectorAll('.load-diff-button').forEach(node => node.click())
@juanca
juanca / github_toggle_height_pr.js
Last active Apr 12, 2017
Github PR bookmarklet: button to toggle height on file diff
View github_toggle_height_pr.js
javascript:
document.querySelectorAll('.file').forEach(function (fileDiff) {
var div, fa;
div = document.createElement('div');
div.className = 'btn btn-sm';
div.textContent = 'TOGGLE';
div.addEventListener('click', function (event) {
const fileActions = event.target.parentElement;
const fileHeader = fileActions.parentElement;
View keybase.md

Keybase proof

I hereby claim:

  • I am juanca on github.
  • I am juanca (https://keybase.io/juanca) on keybase.
  • I have a public key ASCDY5TXy743cj7wb0t-iit3xHJSkpN7HZ5lImMjBpTRPQo

To claim this, I am signing this object:

@juanca
juanca / sprockets-loader-pre-script.rb
Created Jun 19, 2016
sprockets-loader pre-script
View sprockets-loader-pre-script.rb
# Script to go through all files in a specified directory (defaults to javascirpts)
# and replace all relative `require`, `require_tree` and `require_directory` paths
# as absolute paths given `app/assets/javascripts` as root
#
# This is useful for using sprockets-loader (or webpack loaders in general because there is no access
# to path related information)
require 'Pathname'
JAVASCRIPT_ROOT = Pathname.new('app/assets/javascripts/')
You can’t perform that action at this time.