Skip to content

Instantly share code, notes, and snippets.

@jfraboni
jfraboni / gist:9ad63ad9b5822fa756d8
Last active May 25, 2017 18:57
JavaScript / Node.js : random integer between, step by step breakdown
#!/usr/bin/env node
// use a while-loop to run the stepByStep process 100 times //
var i = 0;
while (i < 100) {
i++;
console.log(i + ".");
// between 5 and 10 - you can change these values to inspect different ranges //
stepByStep(5, 10);
@jfraboni
jfraboni / gist:f8dbcdbff76d0ec14451
Last active August 29, 2015 14:04
Magic 8 Ball Variations : Examples of input handling using if-else and or switch statements
#!/usr/bin/env node
var
prmpt = require('prompt'),
fs = require('fs');
var welcomeMessage = "Magic Eight Ball";
console.log(welcomeMessage);
var answers = [];
@jfraboni
jfraboni / index.html
Last active August 29, 2015 14:24 — forked from anonymous/index.html
<!DOCTYPE html>
<html>
<head>
<meta name="underbar: contains" content="underbar: contains">
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@jfraboni
jfraboni / index-jquery-cdn.html
Last active August 29, 2015 14:26
jquery-one: load jquery
<head>
<title>jQuery One</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
</head>
@jfraboni
jfraboni / index-hide-directions.html
Last active August 29, 2015 14:26
product-project
<!-- index.html OTHER HTML -->
<script>
$(function () {
//window.opspark.notes.show();
// or //
window.opspark.notes.hide();
});
</script>
$(function () {
var oldGuardians = [
{
name: "Star Lord",
notes: "Team leader"
},
{
name: "Drax the Destroyer"
},
{
@jfraboni
jfraboni / definition-list.html
Last active August 29, 2015 14:27
A Well of HTML
<dl>
<dt>Canada</dt>
<dd>A very cold country</dd>
<dt>Brazil</dt>
<dd>A very warm country</dd>
</dl>
@jfraboni
jfraboni / jsbin.jihure.js
Last active August 29, 2015 14:27 — forked from anonymous/index.html
variablesvariables// source https://jsbin.com/jihure
/*
* VARIABLES:
*
* 0. To hold things in memory during the life-cycle of a program, we can use variables. Variables
* are named identifiers that can point to values of a particular type, like a Number, String,
* Boolean, Array, Object or another data-type. Variables are called so because once created, we
* can CHANGE the value (and type of value) to which they point.
*
* 1. To create a variable we use the keyword, var, followed by a name (id or alias) for our
* variable.
@jfraboni
jfraboni / jsbin.jihure.js
Last active October 12, 2016 17:58 — forked from anonymous/index.html
variablesvariables// source https://jsbin.com/jihure
/*
* VARIABLES:
*
* 0. To hold things in memory during the life-cycle of a program, we can use variables. Variables
* are named identifiers that can point to values of a particular type, like a Number, String,
* Boolean, Array, Object or another data-type. Variables are called so because once created, we
* can CHANGE the value (and type of value) to which they point.
*
* 1. To create a variable we use the keyword, var, followed by a name (id or alias) for our
* variable.
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gist-embed/2.2/gist-embed.min.js"></script>
<link rel="stylesheet" href="css/studies.css" type="text/css" />
<title>Studies</title>
</head>
<body>
<div id="all-contents">