A brief example on how to use npx to run gist based scripts.
Read the article here https://neutrondev.com/npm-vs-npx-whats-the-difference/ or watch it on YouTube https://www.youtube.com/watch?v=fSHWc8RTJug
| <a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample" | |
| onclick="document.querySelector('.navbar-menu').classList.toggle('is-active');document.querySelector('.navbar-burger').classList.toggle('is-active');"> | |
| <span aria-hidden="true"></span> | |
| <span aria-hidden="true"></span> | |
| <span aria-hidden="true"></span> | |
| </a> |
| # run `python kaggle.py` | |
| from google.colab import drive | |
| drive.mount('/content/gdrive') | |
| import os, json | |
| os.system('mkdir ~/.kaggle;touch ~/.kaggle/kaggle.json') | |
| api_token = {"username":"username","key":"api_key"} | |
| with open('/root/.kaggle/kaggle.json', 'w') as f: | |
| json.dump(api_token, f) | |
| os.system('chmod 600 ~/.kaggle/kaggle.json') |
| python -c "import os;print(sum(os.path.getsize(f) for f in os.listdir('.') if os.path.isfile(f)), 'bytes')" |
| #!/bin/bash | |
| DIR="./build" | |
| if [ -d "$DIR" ]; then | |
| rm -r "$DIR" | |
| fi | |
| mkdir build | |
| cd build | |
| cp -r ../public/elements . |
A brief example on how to use npx to run gist based scripts.
Read the article here https://neutrondev.com/npm-vs-npx-whats-the-difference/ or watch it on YouTube https://www.youtube.com/watch?v=fSHWc8RTJug
| file_name=$1 | |
| echo Compiling $file_name... | |
| javac $file_name | |
| echo Successfully compiled $file_name. | |
| echo Executing $file_name... | |
| shift | |
| java ${file_name%%.java} $@ |
| body { | |
| display: flex; | |
| /*horizontal center*/ | |
| justify-content: center; | |
| /*vertial center*/ | |
| align-items: center; | |
| /*center body*/ |
| function enableContextMenu(aggressive = true) { | |
| void(document.ondragstart=null); | |
| void(document.onselectstart=null); | |
| void(document.onclick=null); | |
| void(document.onmousedown=null); | |
| void(document.onmouseup=null); | |
| void(document.body.oncontextmenu=null); | |
| enableRightClickLight(document); | |
| if (aggressive) { | |
| enableRightClick(document); |
| javascript:function enableContextMenu(aggressive = true) { void(document.ondragstart=null); void(document.onselectstart=null); void(document.onclick=null); void(document.onmousedown=null); void(document.onmouseup=null); void(document.body.oncontextmenu=null); enableRightClickLight(document); if (aggressive) { enableRightClick(document); removeContextMenuOnAll('body'); removeContextMenuOnAll('img'); removeContextMenuOnAll('td'); } } function removeContextMenuOnAll(tagName) { var elements = document.getElementsByTagName(tagName); for (var i = 0; i < elements.length; i++) { enableRightClick(elements[i]); enablePointerEvents(elements[i]); } } function enableRightClickLight(el) { el || (el = document); el.addEventListener('contextmenu', bringBackDefault, true); } function enableRightClick(el) { el || (el = document); el.addEventListener('contextmenu', bringBackDefault, true); el.addEventListener('dragstart', bringBackDefault, true); el.addEventListener('selectstart', bringBackDefault, true); el.addEventListener('c |
| # uncomment if you get no picture on HDMI for a default "safe" mode | |
| #hdmi_safe=1 | |
| # uncomment this if your display has a black border of unused pixels visible | |
| # and your display can output without overscan | |
| #disable_overscan=1 | |
| # uncomment the following to adjust overscan. Use positive numbers if console | |
| # goes off screen, and negative if there is too much border | |
| #overscan_left=16 |