Skip to content

Instantly share code, notes, and snippets.

View luispuerto's full-sized avatar
👨‍💻
Coding Around 🌳 🌲 📈 📊 🙃

Luis Puerto luispuerto

👨‍💻
Coding Around 🌳 🌲 📈 📊 🙃
View GitHub Profile
@jweisber
jweisber / mac-terminal
Last active December 11, 2017 05:36
Open iTerm from Rstudio: replace /Applications/RStudio.app/Contents/MacOS/mac-terminal (see http://tinyurl.com/jvf6lbx, which is now out of date).
#!/usr/bin/osascript
on run argv
set dir to quoted form of (first item of argv)
if application "iTerm" is running then
set wasRunning to true
else
set wasRunning to false
end if
@seandavi
seandavi / debian_rstudio_server_install.sh
Last active July 6, 2018 20:36
Install rstudio server on debian
#!/bin/bash
sudo apt-get install -y libcurl4-openssl-dev libxml2-dev libssl-dev
sudo apt-get install -y r-base r-base-dev
sudo apt-get install -y gdebi-core
wget https://download2.rstudio.org/rstudio-server-1.0.136-amd64.deb
sudo gdebi --non-interactive rstudio-server-1.0.136-amd64.deb
# rstudio will be running on port 8787
@angelamancini
angelamancini / quiver-to-evernote.rb
Created May 20, 2017 16:14
Converts Quiver notebook exports to Evernote *.enex files. Only tested with text and code cells. This *was not tested* with any other cell types.
# Before running this script, go to Quiver and export all notebooks into json/quiver format
# Place them in a folder called `exports` in the same directory as this script.
# In terminal, run `ruby quiver-to-evernote.rb`
# Check for presence of required gems.
# If not present, install the gems
["rubygems", "sanitize"].each do |gem|
begin
gem "#{gem}"
rescue Gem::LoadError
`gem install #{gem}`
@jivanpal
jivanpal / kill-adobe-daemons.sh
Last active August 6, 2023 17:23
Stop Adobe Creative Cloud daemons (background processes) in their tracks
#!/bin/bash
if [ "$1" = "-s" ] || [ "$1" = "--show" ]; then
show=true
else
show=false
fi
if $show || [ "$1" = "-v" ] || [ "$1" = "--verbose" ]; then
verbose=true
@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@scottopell
scottopell / remove_audio_track.md
Last active September 19, 2023 19:29
How to remove an audio track from an mkv
  1. Install mkvtoolsnix.
  2. brew install --with-qt5 mkvtoolnix
  3. Use mkvinfo to get the audio track IDs that you want.
  4. mkvinfo *.mkv
  5. Note that the audio track IDs are not the track numbers. Check the man page of mkvmerge or mkvinfo for more details.
  6. Use mkvmerge to create a copy of the mkv with ONLY the desired tracks using --audio-tracks.
  7. mkvmerge -o out.mkv -a 2 orig.mkv
@ElToro1966
ElToro1966 / r_ubuntu_18_04.sh
Last active October 1, 2023 18:29 — forked from pachadotdev/r_ubuntu_17_10.sh
Install R and RStudio on Ubuntu 18.04 with essential libraries for data science. Based on pachamaltese/r_ubuntu_17_10.sh (for Ubuntu 17.10). Note: You need to make sure the default library location - /usr/local/lib/R/site-packages - is writable .
# Install R
sudo apt update
sudo apt install gdebi libxml2-dev libssl-dev libcurl4-openssl-dev libopenblas-dev r-base r-base-dev
# Install RStudio
cd ~/Downloads
wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.2.5001-amd64.deb
sudo gdebi rstudio-1.2.5001-amd64.deb
printf '\nexport QT_STYLE_OVERRIDE=gtk\n' | sudo tee -a ~/.profile
@gobinathm
gobinathm / shallow_update_git.md
Created March 6, 2017 18:24
Fix for Remote rejected shallow update not allowed after changing Git remote URL

Some Time there is a shallow update not allowed issue in your cloned GIT repo.

This means that you have to unshallow your repository. To do so you will need to add your old remote again.

git remote add origin <path-to-old-remote> After that we use git fetch to fetch the remaining history from the old remote (as suggested in this answer).

git fetch --unshallow origin And now you should be able to push into your new remote repository.

@blackgate
blackgate / mbp2011-disable-amd-gpu.md
Last active November 22, 2023 01:23
Macbook Pro 2011 - Disable AMD GPU
@idleberg
idleberg / sublime-text-macos-context-menu.md
Last active February 20, 2024 09:37 — forked from vincentmac/sublime-text-osx-context-menu.md
“Open in Sublime Text” in macOS context-menu

This list has been updated for Big Sur (and later). Since I don't use these versions, this guide might still need further improvements. For older macOS versions, please see this older revision.

Open in Sublime Text

  • Open Automator
  • Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
  • Set the script action to /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n "$@"
  • Set “Pass input” to as arguments