Skip to content

Instantly share code, notes, and snippets.

View tabiodun's full-sized avatar

Tobi Abiodun tabiodun

  • Toronto, ON
View GitHub Profile
import Ember from 'ember';
export default Ember.Component.extend({
});
@tabiodun
tabiodun / vscode_extensions.txt
Last active November 30, 2019 17:39
VSCode Extensions
alefragnani.Bookmarks
alexkrechik.cucumberautocomplete
andrejunges.Handlebars
bajdzis.vscode-database
batisteo.vscode-django
christian-kohler.npm-intellisense
CoenraadS.bracket-pair-colorizer
dariofuzinato.vue-peek
dbaeumer.jshint
dbaeumer.vscode-eslint
@tabiodun
tabiodun / polling.js
Created March 20, 2020 16:00
Polling in Javascript
async function poll(fn, fnCondition, ms, attemptsLimit) {
let attempts = 0;
let result = await fn();
while (fnCondition(result) && attemps < attemptsLimit) {
await wait(ms);
result = await fn();
attempts++;
}
return result;
}
@tabiodun
tabiodun / csv_generated_string_escape.py
Created March 31, 2020 14:58 — forked from seanieb/csv_generated_string_escape.py
Prevent CSV Injection when suing user generated data
def escape_csv(user_generated_string):
"""
CSV injection esacaping for Python. Excel treats a string as active content when it encounters a
"trigger" character at the start of the string. This method returns the string with
the triger character escaped.
"""
if user_generated_string[0] in ('@','+','-', '='):
user_generated_string = "'" + user_generated_string
function applyChanges() {
this.isSaving = true;
for (const key of Object.keys(this.buffer)) {
this[key] = this.buffer[key];
}
this.buffer = {};
delete this.isSaving;
}
function rollback() {

Python Programming Assignment: Expense Tracker Application

Objective

Develop a console-based Expense Tracker application in Python that allows users to monitor and manage their daily expenses. This project will help you practice fundamental Python concepts such as data structures, file handling, user input, and functions.

Requirements

1. Add Expense

  • Functionality: Allow users to input new expenses with the following details:
  • Amount: A positive number representing the cost.