Skip to content

Instantly share code, notes, and snippets.

View avermeulen's full-sized avatar

Andre Vermeulen avermeulen

  • project codeX
  • Cape Town, South Africa
View GitHub Profile

Deploy and Oracle Jet App using Heroku

  • Move your Oracle Jet folder into your ExpressJS API folder
  • Or create a new folder for an small ExpressJS application

Delete these in the Oracle Jet app folder:

  • the .git folder - use rm -rf .git
  • the .gitignore file - use rm .gitignore

Create new folder for a small ExpressJS application

@avermeulen
avermeulen / index.html
Last active June 7, 2018 08:35
What is localStorage and how to use it.
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<style media="screen">
.name {
font-size: 2em;
}
</style>
@avermeulen
avermeulen / index.html
Created June 20, 2018 09:27
How to do stars ratings
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<style media="screen">
.show {
display: block;
var schedule = require('node-schedule');
schedule.scheduleJob( process.env.SCHEDULE_SETTINGS || '00 00 6 * * *', function(runAt){
console.log(runAt);
// is this the last day of the month?
// if it is... call the function to create the metric instances
// let taskList = getAllTasks();
// taskList.forEeach((task) => {

ESLint intro

ESLint checks if your JavaScript for errors and if it meets the configured coding standard.

You can read more about linting here or here. ESLint help us to find bugs in our JavaScript code quicker. It check for things like undefined variables or functions and prevent runtime errors in the process.

Create a npm project

To install eslint in your local project you need to be in a npm project. Make your current folder one by doing this

interface Language {
greet(name: string) : string
//shout(name: string) : string
}
function English () : Language {
function greet (name) {
return 'Hello, ' + name;
}
create table users(id serial primary key,
firstName text not null,
email text not null);
insert into users(firstName, email) values ('Andre', '[email protected]');
insert into users(firstName, email) values ('Andrew', '[email protected]');
insert into users(firstName, email) values ('Bob', '[email protected]');
@avermeulen
avermeulen / 01-setup-new-typescript-project.md
Last active February 17, 2025 12:56
TypeScript basics with Mocha setup - learn how to use interfaces

Setup a new TypeScript project with Mocha support

Ensure you have TypeScript installed globally using this command:

npm install -g typescript

This outlines how to setup a new TypeScript project with mocha support.

Universal Web development concepts

Take a look at the links below - they are about web development using PHP, Ruby, Java and Microsoft .NET

Scan through these articles and make a list of all the things that looks familiar to you. Don't worry about the details. Just look for concepts you immediately recognise or is vaguely familiar.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
</head>
<body>