Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🚀

Mauro Mandracchia M3kH

💭
🚀
View GitHub Profile
View index.html
<html>
<head>
<title>Tic Tac Toe!</title>
</head>
<body>
<div>
<span>
<input name="" type="text" value="-" size="1"/>
</span>
View extendAndGetClasses.js
class MovieEmployed {
constructor(name) {
this.name = name;
this.movies = [];
}
addMovie(movieInstance) {
this.movies.push(movieInstance);
@M3kH
M3kH / Todo.md
Last active Aug 10, 2017
OOP - HYF Class
View Todo.md

Assignment in the class

  • HYFClass should have a method that returns all the name of the members.
  • HYFClass should have a method that returns only Students and one that returns only Teachers
@M3kH
M3kH / index.html
Last active Mar 26, 2017
XMLHTTPRequest
View index.html
<html>
<head>
<script src="./index.js"></script>
</head>
<body>
<ul id="repos">
</ul>
</body>
</html>
@M3kH
M3kH / index.js
Created Mar 26, 2017
Controlling While loops
View index.js
function ABlockingFunction( stopAtTime ){
var StartAt = new Date();
var animation = ['Running...'];
while( StartAt <= stopAtTime ){
StartAt = new Date();
animation.push('.')
console.log(animation.join(''));
}
return this;
}
@M3kH
M3kH / JS.md
Last active Mar 26, 2017
HYF - JavaScript
View JS.md

Hack Your JavaScript

This is the description of the classes for JavaScript foundamentals.

Composition

- Values, Operators and Variables (lesson 1)

- Primitives Types (lesson 1)
    - Strings
    - Numbers
    - Array
@M3kH
M3kH / momo.sh
Created Oct 11, 2015
Momo updater
View momo.sh
#!/bin/bash
LATEST=$(curl https://api.github.com/repos/m3kh/momo/commits | underscore extract '0.sha' | sed s/[^a-zA-Z0-9\_]//g);
CURRENT=$(cat /home/pi/.momo_version | sed s/[^a-zA-Z0-9\_]//g);
echo "${LATEST}";
echo "${CURRENT}";
if [ "$LATEST" = "$CURRENT" ]; then
echo "Momo is uptodate";
@M3kH
M3kH / Inspector
Last active Dec 23, 2015
If I run inspector(window), I get all undefined, did you know why?
View Inspector
var inspector = function(obj){
var config = config || {},
html = '';
config.iter = function(e){
html = '<ul>';
if( typeof e === "function" ){
// setTimeout(function(){
try{
You can’t perform that action at this time.