Skip to content

Instantly share code, notes, and snippets.

View xshapira's full-sized avatar

Max Shapira xshapira

View GitHub Profile
@xshapira
xshapira / workbench.colorCustomizations.json
Created September 11, 2020 17:44 — forked from jacklorusso/workbench.colorCustomizations.json
A list of all Visual Studio Code customizable colors, grouped by UI region. Copy and paste into User Settings (comments are allowed) to tweak an existing theme or work on your own.
"workbench.colorCustomizations": {
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast.
"contrastActiveBorder": "",
"contrastBorder": "",
// Base Colors
"focusBorder": "",
"foreground": "",
"widget.shadow": "",
"selection.background": "",
"descriptionForeground": "",

Intro

To view the progress of a Powerpoint presentation, a progress bar can be displayed at the bottom of the slide show.

How to proceed

Once the slideshow is complete, go to Tools > Macro > Visual Basic Editor.

In the new window, select Insert > Module and copy this text in the blank page:

Sub AddProgressBar()
    On Error Resume Next
@xshapira
xshapira / django_deploy.md
Created December 8, 2020 02:01 — forked from bradtraversy/django_deploy.md
Django Deployment - Digital Ocean

Django Deployment to Ubuntu 18.04

In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc

Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server

Create A Digital Ocean Droplet

Use this link and get $10 free. Just select the $5 plan unless this a production app.

@xshapira
xshapira / docker.md
Created July 6, 2021 06:50 — forked from ShawnClake/docker.md
Docker cheat sheet
@xshapira
xshapira / eslint_prettier_airbnb.md
Created August 3, 2021 12:59 — forked from bradtraversy/eslint_prettier_airbnb.md
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@xshapira
xshapira / gist:0123e000fe559dc12a8eb2aabfe37acc
Last active February 19, 2022 14:34 — forked from CrookedNumber/gist:8964442
git: Removing the last commit

Removing the last commit

To remove the last commit from git, you can simply run git reset --hard HEAD^ If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.

If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^ which will evict the commits from the branch and from the index, but leave the working tree around.

If you want to save the commits on a new branch name, then run git branch newbranchname before doing the git reset.

@xshapira
xshapira / README.md
Created May 31, 2022 17:18 — forked from lucianoratamero/README.md
Using Vite with Django, the simple way

Using Vite with Django, the simple way

This gist has most of the things I've used to develop the frontend using vite inside a monolithic django app.

Here's a boilerplate that uses this approach: https://github.com/labcodes/django-react-boilerplate

A couple of things to note:

  • it runs in SPA mode by default. If you want SSR, you may want to look into django_vite;
  • static files unrelated to your app, like images or fonts, should be served by django, instead of imported directly inside your frontend app;
@xshapira
xshapira / Computer Vision.md
Created June 17, 2022 04:28 — forked from sgoyal1012/Computer Vision.md
Computer Vision Nanodegree

Image Representation and Classification

  • Emotional intelligence

    • Ability to read and understand emotions -- Affectiva uses emotions on face, i.e. facial features.
  • Color Images representation

  • Depth is the number of channels
If the identification problem is easier in color for us humans, it’s likely easier for an algorithm to see color images too!
@xshapira
xshapira / jupyter-notebook-shortcut.json
Created June 17, 2022 06:16 — forked from ggada/notebook.json
Jupyter notebook.json: ~/.jupyter/nbconfig/notebook.json
{
"kse_rebinds": {
"edit": [],
"command": [
{
"to": ";",
"action_name": "jupyter-notebook:run-all-cells-above"
}
]
},
@xshapira
xshapira / jupyterlab_shortcuts.json
Created June 17, 2022 06:17 — forked from dschaehi/jupyterlab_shortcuts.json
Jupyter Lab Keyborad Shortcuts
{
"shortcuts": [
{
"command": "notebook:toggle-all-cell-line-numbers",
"keys": [
"Alt L"
],
"selector": ".jp-Notebook:focus"
},
// Moving cells