Skip to content

Instantly share code, notes, and snippets.

View juanmsl's full-sized avatar
:octocat:

Juan Manuel Sánchez Lozano juanmsl

:octocat:
View GitHub Profile
sudo apt-get update
sudo apt-get install freeglut3 freeglut3-dev binutils-gold g++ cmake libglew-dev mesa-common-dev build-essential libglew1.5-dev libglm-dev
glxinfo | grep OpenGL
@juanmsl
juanmsl / aws.config
Created May 19, 2023 04:20
Configuration for multiple accounts on AWS ~/.aws/config and Azure login
[profile profile-1]
region=us-east-1
output=json
source_profile=root-profile
role_arn=arn:aws:iam::0123456789:role/Role
[profile profile-2]
region=us-east-1
output=json
source_profile=root-profile
#!/bin/bash -e
echo "usage: $0 <txt file containing list of urls>"
inputFile=${1}
if [ $# -ne 1 ] || [ ! -f ${inputFile} ];then
echo 'check usage'
exit -1
fi
@juanmsl
juanmsl / iterm-profile.md
Last active May 2, 2021 18:56 — forked from mul14/profile.md
iTerm key bindings

Open the iTerm preferences ⌘+, and navigate to the Profiles tab (the Keys tab can be used, but adding keybinding to your profile allows you to save your profile and sync it to multiple computers) and keys sub-tab and enter the following:

Delete all characters left of the cursor

⌘+←Delete Send Hex Codes:

  • 0x18 0x7f – Less compatible, doesn't work in node and won't work in zsh by default, see below to fix zsh (bash/irb/pry should be fine), performs desired functionality when it does work.
  • 0x15 – More compatible, but typical functionality is to delete the entire line rather than just the characters to the left of the cursor.

Delete all characters right of the cursor

⌘+fn+←Delete or ⌘+Delete→ Send Hex Codes:

  • 0x0b
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa
# ssh-keygen -t rsa -b 4096 -C personal -f $HOME/.ssh/id_rsa -N ""
@juanmsl
juanmsl / global.gitconfig
Created February 12, 2021 00:21
Use different git global configurations depends on an specific folder
# This is gitconfig into ~/.gitconfig
[user]
name = Your global name
email = your_global@email.com
[includeIf "gitdir:~/code/personal/**/"]
path = ~/code/personal/.gitconfig
MAIN_DIRECTORY="$HOME/sdra-software"
NUM_PROCESSORS=$(command nproc 2>/dev/null || echo 4)
VTK_REPOSITORY="https://gitlab.kitware.com/vtk/vtk.git"
VTK_VERSION="v8.1.2"
VTK_CLONE_DIR="$MAIN_DIRECTORY/vtk"
VTK_BUILD_DIR="$VTK_CLONE_DIR/build"
ITK_REPOSITORY="https://github.com/InsightSoftwareConsortium/ITK.git"
ITK_VERSION="v4.13.1"

Keybase proof

I hereby claim:

  • I am juanmsl on github.
  • I am juanmsl (https://keybase.io/juanmsl) on keybase.
  • I have a public key ASA5_p4jIBQ6p1snPt_GzgeAj6IfC9hppz4NLNFXhSKmMQo

To claim this, I am signing this object:

@juanmsl
juanmsl / install_gc_tools.sh
Last active July 19, 2018 23:32
This script install OGRE 3D, Bullet, VTK and their respective dependencies (OpenGL)
MAIN_DIRECTORY="$HOME/CG-Software"
NUM_PROCESSORS=$(command nproc 2>/dev/null || echo 4)
OGRE_REPOSITORY="https://bitbucket.org/sinbad/ogre/"
OGRE_CLONE_DIR="$MAIN_DIRECTORY/ogre"
OGRE_BUILD_DIR="$OGRE_CLONE_DIR/build"
OGRE_SAMPLE="$OGRE_BUILD_DIR/bin/SampleBrowser"
OGRE_LIB_DEPENDENCIES="$OGRE_BUILD_DIR/Dependencies/lib/lib*"
BULLET_REPOSITORY="https://github.com/bulletphysics/bullet3.git"