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
| for m in range(1,100): print("FizzBuzz" if (m%15==0) else"Fizz" if (m%3==0) else "Buzz" if (m%5==0) else m) |
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
| public int getEquilibrium(int[] array) { | |
| long totalSum = sum(array); | |
| long lowSum = 0L; | |
| for (int i = 0; i < array.length; i++) { | |
| totalSum -= array[i]; | |
| if (lowSum == totalSum) { | |
| return i; | |
| } | |
| lowSum += array[i]; | |
| } |
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
| <canvas id="gc" height="600" width="600" style="margin:auto; display: block;"></canvas> | |
| <script type="text/javascript"> | |
| window.onload = function() { | |
| canvas = document.getElementById('gc'); | |
| context = canvas.getContext('2d'); | |
| document.addEventListener('keydown', keyPush); | |
| setInterval(game, 40); | |
| } | |
| let movX = 0; |
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
| # Simple silent alarm widget for windows | |
| # Set time in seconds and text below or pass them in cmd like this: python timer 5 hello | |
| import sys | |
| import time | |
| from tkinter import * | |
| from tkinter.messagebox import showinfo | |
| if (len(sys.argv) > 1): | |
| delay = float(sys.argv[1]) |
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
| #Given two strings find characters present in both. E.g, for "harpoon" and "countryside", the answer is "nro". | |
| #https://www.talentrider.com | |
| def intersection(a, b): | |
| return ''.join(set(a) & set(b)) |
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 shuffle(arr) { | |
| for (let i = arr.length - 1; i > 0; i--) { | |
| const j = Math.floor(Math.random() * (i + 1)); | |
| [array[i], array[j]] = [array[j], array[i]]; | |
| } | |
| return arr; | |
| } |
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
| ES7+ React/Redux/React-Native snippets: | |
| dsznajder.es7-react-js-snippets | |
| ESLint: | |
| dbaeumer.vscode-eslint | |
| More human-friendly TS errors: | |
| https://github.com/yoavbls/pretty-ts-errors | |
| Prettier - Code formatter: |
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
| Code: | |
| VSCode, Git, Node, NVM, PuTTY | |
| Notepad++, Sublime | |
| Foobar, VLC, 7z, Steffen Gerlach Scanner | |
| TG, Discord | |
| FireFox, Chrome (OneTab, Adblock, React devtools, Grid Ruler, Measure dimensions, FullPage) | |
| f.lux (or use built-in nightshift feature in win10) | |
| Paint NET | |
| Libre Office |
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
| @echo off | |
| setlocal enabledelayedexpansion | |
| set "outputFile=files_list.txt" | |
| :: Change the code page to UTF-8 to handle Cyrillic characters | |
| chcp 65001 | |
| if exist "%outputFile%" ( | |
| del "%outputFile%" | |
| ) |
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
| Homebrew | |
| Git cli | |
| Chrome + extensions | |
| Sublime Text | |
| VScode + Extensions | |
| Node, NPM, nvm | |
| Yarn | |
| Serve - https://github.com/vercel/serve/ | |
| Openshift cli | |
| Python |
OlderNewer