Skip to content

Instantly share code, notes, and snippets.

View Joaquin6's full-sized avatar
🏠
Working from home

Joaquin Briceno Joaquin6

🏠
Working from home
  • Overland Park, KS
View GitHub Profile
@Joaquin6
Joaquin6 / memorySizeOfObject.js
Created November 9, 2018 16:03
calculate memory size of javascript object, it is not a accurate value!
function memorySizeOf(obj) {
var bytes = 0;
function sizeOf(obj) {
if(obj !== null && obj !== undefined) {
switch(typeof obj) {
case 'number':
bytes += 8;
break;
case 'string':
@Joaquin6
Joaquin6 / vim-cheat-sheet.md
Created March 15, 2019 07:26
Vim Cheat Sheet

Vim Cheat Sheet

My collection of vim tips to make the best editor even better. This is by no means complete or a tutorial on how to use vim, but a set of commands I don't want to forget and need to write them down before they burn into memory.

See the resources section below for a more complete introduction and a set of in-depth tutorials.

Navigation

:nn " Jump to line nn

@Joaquin6
Joaquin6 / gitlab-to-bitbucket.py
Created June 7, 2019 05:03 — forked from danhper/gitlab-to-bitbucket.py
Script to migrate repositories from GitLab to Bitbucket
import os
import re
import subprocess
import requests
GITLAB_ENDPOINT = os.environ["GITLAB_ENDPOINT"]
GITLAB_TOKEN = os.environ["GITLAB_TOKEN"]
@Joaquin6
Joaquin6 / .zshrc
Last active June 17, 2019 13:47 — forked from deepu105/.zshrc
export TERM="xterm-256color"
# workaround as per https://superuser.com/questions/1222867/zsh-completion-functions-broken
FPATH=/home/joaquin/.oh-my-zsh/plugins/git:/home/joaquin/.oh-my-zsh/functions:/home/joaquin/.oh-my-zsh/completions:/usr/share/zsh/site-functions:/usr/share/zsh/5.7.1/functions
export FPATH
# set shell
export SHELL=/usr/bin/zsh
@Joaquin6
Joaquin6 / VSCode-extensions
Created June 17, 2019 13:59 — forked from deepu105/VSCode-extensions
VSCode plugins I use
code --install-extension QassimFarid.ejs-language-support
code --install-extension SirTori.indenticator
code --install-extension TimonVS.ReactSnippetsStandard
code --install-extension TwentyChung.jsx
code --install-extension abusaidm.html-snippets
code --install-extension asvetliakov.move-imports
code --install-extension aws-scripting-guy.cform
code --install-extension bierner.markdown-preview-github-styles
code --install-extension ccitiriga.TSMethodCreator
code --install-extension christian-kohler.npm-intellisense
@Joaquin6
Joaquin6 / osx-brew-gnu-coreutils-man.sh
Created August 2, 2019 05:19 — forked from quickshiftin/osx-brew-gnu-coreutils-man.sh
Running GNU coreutils via Homebrew on your Mac? Here's a one-liner to get the manpages working!
# Short of learning how to actually configure OSX, here's a hacky way to use
# GNU manpages for programs that are GNU ones, and fallback to OSX manpages otherwise
alias man='_() { echo $1; man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $1 1>/dev/null 2>&1; if [ "$?" -eq 0 ]; then man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $1; else man $1; fi }; _'
# see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/
# core
brew install coreutils
# key commands
brew install binutils
brew install diffutils
brew install ed --default-names
brew install findutils --with-default-names
using NuGet.Common;
using NuGet.Configuration;
using NuGet.Frameworks;
using NuGet.Packaging;
using NuGet.Packaging.Core;
using NuGet.Packaging.Signing;
using NuGet.Protocol;
using NuGet.Protocol.Core.Types;
using NuGet.Resolver;
using NuGet.Versioning;
@Joaquin6
Joaquin6 / post-merge
Last active April 12, 2020 21:32 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` or `git checkout` if a specified file was changed
# Run `chmod +x post-checkout` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id HEAD@{1} HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && echo " * changes detected in $1" && echo " * running $2" && eval "$2"
@Joaquin6
Joaquin6 / post-merge
Created April 12, 2020 21:28 — forked from GianlucaGuarini/post-merge
Git hook that gets triggered after any 'git pull' whenever one of the files specified has changed. Useful to update any web application dependency using bower npm or composer
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# forked by Gianluca Guarini
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep -E --quiet "$1" && eval "$2"
}