Skip to content

Instantly share code, notes, and snippets.

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

José Compadre Junior compadrejunior

🏠
Working from home
View GitHub Profile
@thedavecarroll
thedavecarroll / markdown.json
Created May 11, 2020 19:16
Markdown Snippet for Visual Studio Code
{
// insert markdown links
"Insert Link" : {
"prefix": "link",
"body": [
"[text][text]{:target=\"_blank\"}"
]
},
"Insert Reference" : {
"prefix": "ref",
@cthurston
cthurston / mongodb-facet-combine.js
Created November 3, 2017 14:21
MongoDb combine $facet results into a single result set.
db.getCollection('list').aggregate([
{
$facet: {
"events":[{
$match: {
'type': 'Event'
}
}],
"tasks": [{
$match: {
@niksumeiko
niksumeiko / git.migrate
Last active July 19, 2024 21:32
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.