Skip to content

Instantly share code, notes, and snippets.

View dominic248's full-sized avatar
💻
Focusing

Dominic Silveira dominic248

💻
Focusing
  • Senior Software Engineer
View GitHub Profile
@dominic248
dominic248 / GoogleDriveHashToSheets.gs
Last active January 24, 2022 17:28
Getting hash values of files in Google Drive and storing them in Google Sheets
function driveHash() {
var folderId="<folderID>"; // Folder ID: https://drive.google.com/drive/folders/<folderID>?usp=sharing
var sheetName="Sheet1"; // Name of the sheet
var sheetId="<sheetID>" // Google Sheets ID: https://docs.google.com/spreadsheets/d/<sheetID>/edit#gid=0
var pathPattern="\\" // "\\" for "\" and "/" for "/"
var dApp=DriveApp;
var folder=dApp.getFolderById(folderId);
var ss = SpreadsheetApp.openById(sheetId);
SpreadsheetApp.setActiveSpreadsheet(ss);
@dominic248
dominic248 / cheatsheet.cpp
Created August 3, 2020 17:51 — forked from satwikkansal/cheatsheet.cpp
C++ STL cheatsheet for competitive progrmming
/*
This a header file that includes every standard library.
You can use it to save time.
NOTE: This header file may not be recognized by compilers
other than gcc.
*/
#include <bits/stdc++.h>
/*
//Use this if the above header file doesn't work.
@dominic248
dominic248 / Contributing.md
Created July 17, 2020 05:52 — forked from MarcDiethelm/Contributing.md
How to contribute to a project on Github

This text now lives at https://github.com/MarcDiethelm/contributing/blob/master/README.md. I turned it into a Github repo so you can, you know, contribute to it by making pull requests.


Contributing

If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request.

NOTE
  1. Use 100x100 image dimension on these endpoints to avoid memory leak, due to large numpy array. (For face training and face recognition API's)
  2. Server sleeps after 30 minutes of inactivity and will take time to restart on new requests after 30 minutes of inactivity.
@dominic248
dominic248 / ssh.md
Created May 6, 2020 17:40 — forked from bradtraversy/ssh.md
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh [email protected]

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

@dominic248
dominic248 / pipenv_cheat_sheet.md
Created May 6, 2020 17:38 — forked from bradtraversy/pipenv_cheat_sheet.md
Pipenv cheat sheet for common commands

Pipenv Cheat Sheet

Install pipenv

pip3 install pipenv

Activate

pipenv shell
@dominic248
dominic248 / vscode_shortcuts.md
Created May 6, 2020 17:38 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@dominic248
dominic248 / python_heroku.MD
Created May 6, 2020 17:37 — forked from bradtraversy/python_heroku.MD
Python & Postgres Heroku Deployment

Python Heroku Deployment

Steps to create a postgres database and deply a Python app to Heroku

Install guinicorn locally

pipenv install gunicorn
or
pip install gunicorn