Skip to content

Instantly share code, notes, and snippets.

View jackpinto's full-sized avatar

Jackson Pinto jackpinto

View GitHub Profile
:r !uuidgen|sed 's/.*/"uid": "&",/'
@jackpinto
jackpinto / create-local-docker-volume.md
Last active May 10, 2022 14:26
How to create a local volume bind to host directory

Docker

Volume mount point

How to create a volume and set local host mount point.

Create volume first

docker volume create --driver local \
 --opt type=none \
@jackpinto
jackpinto / tmux.conf
Created April 2, 2021 13:32 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000

Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

This guide will walk you through the steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest.

Prerequisites

This guide assumes that you are using the following setup:

You could still make this guide work with other setups (possibly with some modifications to the commands and whatnot).

@jackpinto
jackpinto / get-latest-tag-on-git.sh
Created December 1, 2019 18:45 — forked from rponte/get-latest-tag-on-git.sh
Getting latest tag on git repository
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples
@jackpinto
jackpinto / _mssql-admin-tips-and-techs.md
Last active July 27, 2018 13:56
MSSql Admin Tips&Techs

A script collection for MSSql databases administration

  1. Enable SA user
  2. --
  3. Restore database
SELECT TOP (1000) q.[Id], q.[JobId], q.[Name], q.[Reason], q.[CreatedAt], q.[Data]
FROM [SimplesNacional.Task].[HangFire].[State] q
INNER JOIN
(
SELECT
MAX(x.id) stateid,
x.jobid
FROM [SimplesNacional.Task].[HangFire].[State] x
WHERE x.name = 'Failed'
AND x.jobid IN
@jackpinto
jackpinto / gist:1c1fbc0d76319e7015045be1e50a26f0
Created October 16, 2017 22:16
Install Vim 8 with Python, Python 3, Ruby and Lua support on Ubuntu 16.04
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
#Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt-get install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
cd ~
@jackpinto
jackpinto / robomongo_desktop_entry.md
Created October 16, 2017 18:47 — forked from LogansUA/robomongo_desktop_entry.md
Create desktop entry on Ubuntu system on Robomongo example

Creating desktop entry

$ touch /usr/share/applications/robomongo.desktop

Desktop file

[Desktop Entry]
@jackpinto
jackpinto / cvimrc.vim
Last active May 22, 2019 21:32
cVim config file
" Settings
set nohud
set nosmoothscroll
set noautofocus " The opposite of autofocus; this setting stops
" sites from focusing on an input box when they load
set typelinkhints
let searchlimit = 30
let scrollstep = 70
let barposition = "top"
let blacklists = ["*://en.todoist.com/*","*://www.keyhero.com/*","*://localhost/*","*://mail.google.com/*","*://inbox.google.com/*","*://web.whatsapp.com/*","*://outlook.live.com/*", "*://www.youtube.com/*", "*://*.typingclub.com/*", "*://www.vimgenius.com/*"]