Skip to content

Instantly share code, notes, and snippets.

@jose8a
jose8a / App.vue
Created September 9, 2022 19:10
retool-coding-test-file
<script setup>
import { ref, reactive } from 'vue';
let imageData = ref([]);
// let favorites = reactive([]);
let imagesUrl = "https://retoolapi.dev/lfaPzW/dogs";
fetch(imagesUrl)
.then(res => res.json())
.then(r => {
@jose8a
jose8a / README-Template.md
Created February 2, 2018 21:10 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@jose8a
jose8a / .eslintrc
Created April 8, 2016 08:35 — forked from cletusw/.eslintrc
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
#!/bin/bash
### Warning - not a script. Do not run in shell. It won't work.
### Sources
* [dpkg dependency problems - 1](http://unix.stackexchange.com/questions/109698/dpkg-dependency-problems-prevent-configuration-of-initramfs-tools/109703#109703)
* [how can I resolve dpkg dependency](http://askubuntu.com/questions/252777/how-can-i-resolve-dpkg-dependency)
* [package dbus is not configured yet](http://askubuntu.com/questions/202321/package-dbus-is-not-configured-yet)
* [dpkg - E:Internal error during update/install](http://askubuntu.com/questions/266450/how-to-fix-e-internal-error-no-file-name-for-libc6)
* [dpkg error code](http://askubuntu.com/questions/597543/dpkg-error-code)
```
#!/bin/bash
# instructions mostly from Digital Ocean tutorial
# https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server
# Update linux box
sudo apt-get update
# get and install the latest distro-stable version of nodejs
sudo apt-get install nodejs
#!/bin/bash
### URL: https://www.elastic.co/downloads/kibana
### Version 4.1.5 ... compatible with ES >= 2.0
### Download and unpack
wget https://download.elastic.co/kibana/kibana/kibana-4.4.1-linux-x64.tar.gz
tar -xvzf ./kibana-4.4.1-linux-x64.tar.gz
### Version 4.1.5 ... compatible with ES < 2.0
#!/bin/bash
### Install and configure
sudo apt-get update
sudo apt-get install mysql-server libapache2-mod-auth-mysql
### Post-install, activate the db
sudo mysql_install_db
sudo /usr/bin/mysql_secure_installation
### Leave root password blank, and decline changing password at end of install
#!/bin/bash
### System upgrade and PG Install
#```
sudo apt-get update
#sudo apt-get dist-upgrade
sudo apt-get install postgresql postgresql-contrib
#```
### Switch to User Postgres and

Basic Callback Pattern

function shoutOutTo(param1, param2, callback) {
    alert('Holla, holla, holla!\nGiving a shoutOut to ' + param1);
    callback();
}

theHomie('Buster', function() {
    alert('Finished eating my sandwich.');
});
@jose8a
jose8a / Udacity_TDD.md
Created June 18, 2015 04:47
Notes on Udacity's JS TDD course

Jasmine library ..

SpecRunner.html --> top-level file for setting up and running tests on Jasmine Specs (XXXSpec.js, YYYSpec.js, etc) --> individual spec files container individual tests, as well as Suites of tests

describe --> identifies a "suite" -- that is, a group of related "specs" it --> identifies a spec in a "Test Suite" ... typically colored green

"Typical" test architecture: