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
| #!/usr/bin/zsh | |
| # Delete old versions | |
| for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done; | |
| # Add Docker's official GPG key: | |
| sudo apt-get update; | |
| sudo apt-get install ca-certificates curl; | |
| sudo install -m 0755 -d /etc/apt/keyrings; |
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
| # vim:fileencoding=utf-8:foldmethod=marker | |
| #: Fonts {{{ | |
| #: kitty has very powerful font management. You can configure | |
| #: individual font faces and even specify special fonts for particular | |
| #: characters. | |
| font_family Monaspace Argon Var,Cascadia Code PL | |
| # bold_font auto |
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
| def _flip_matrix(matrix, n_90_degrees_flips): | |
| ''' | |
| Let's say that we have the following matrix: | |
| 1 , 2 , 3 , 4 | |
| 5 , 6 , 7 , 8 => [[1 , 2 , 3 , 4], [5 , 6 , 7 , 8], [9 , 10, 11, 12], [13, 14, 15, 16]] | |
| 9 , 10, 11, 12 | |
| 13, 14, 15, 16 | |
| And we want to flip it 1x in a way that it looks like the following | |
| 13, 9 , 5, 1 | |
| 14, 10, 6, 2 |
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
| class Node: | |
| def __init__(self, key=None, left=None, right=None, parent=None, value=1): | |
| self.key = key | |
| self.left = left | |
| self.right = right | |
| self.parent = parent | |
| self.value = value | |
| def insert(key, value, node, parent=None): | |
| if not node: |
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
| <script> | |
| const GITHUB_REPOS_SEARCH_URL = 'https://api.github.com/search/repositories?q=' | |
| const debounce = (milliseconds) => { | |
| return new Promise((resolve, reject)=> { | |
| if (debounceId) { | |
| clearTimeout(debounceId) | |
| } | |
| debounceId = setTimeout(()=> { | |
| debounceId = null |
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
| import { enableProdMode } from '@angular/core'; | |
| import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | |
| import { AppModule } from './app/app.module'; | |
| import { environment } from './environments/environment'; | |
| if (environment.production) { | |
| enableProdMode(); | |
| } | |
| const gapi = window['gapi']; |