Setup a folder inside a repo with a specific commit of that repo.
git worktree add [-f] [--detach] [--checkout] [--lock] [-b ] []
This command will create a branch with no parent (no commit history) on a repo.
git checkout --orphan <new-branch>
Manage folders linked to others branches of your repo.
Do not confuse them with git submodules which are links to different repositories.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bufio" | |
| "github.com/yuin/goldmark" | |
| "os" | |
| ) | |
| func main() { | |
| scanner := bufio.NewScanner(os.Stdin) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function cbtoasync(fncb, ...params) { | |
| return new Promise((res, rej) => { | |
| fncb(...params, (...data) => {res(...data)}) | |
| }) | |
| } | |
| function tr_cbtoasync(fncb) { | |
| return (...data) => cbtoasync(fncb, ...data) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const f1 = a => a + 1 | |
| const f2 = (...args) => args.join(', ') | |
| const src = { a: 1, b: 2, c: 3, d: 4, e: 5 } | |
| const mapDesc = [ | |
| 'a', | |
| ['b', 'f'], | |
| [[f1, 'c'], 'g'], | |
| [[f2, 'd', 'e'], 'h'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let obj = { a: 'a', b: null, undefined: 'undef', null: 'nil' } | |
| obj['a'] // 'a' | |
| obj[obj.b] // 'nil' | |
| obj[obj.c] // 'undef' (obj.c is undefined) | |
| obj[obj] // undefined | |
| // Can be used for making conditions with objects |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * This is a proxy for making w3c compliant requests to the EPITECH's BLIH API. | |
| * It allows to make such calls fron any w3c compliant source (e.g. XHR requests). | |
| * The proxy uses https for security reasons. | |
| * To check BLIH API status simply make a GET request on '/'. | |
| * | |
| * TODO: | |
| * - Add endpoint showing every endpoint available (API documentation). | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const http = require('http') | |
| const url = require('url') | |
| const path = require('path') | |
| const fs = require('fs') | |
| const PORT = parseInt(process.argv[2]) || 8888 | |
| http.createServer(function(req, res) { | |
| const uri = url.parse(req.url).pathname | |
| const filename = path.join(process.cwd(), uri) |
NewerOlder