Skip to content

Instantly share code, notes, and snippets.

View M3kH's full-sized avatar
💭
🚀

Mauro Mandracchia M3kH

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

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 March 26, 2017 14:31
XMLHTTPRequest
<html>
<head>
<script src="./index.js"></script>
</head>
<body>
<ul id="repos">
</ul>
</body>
</html>
@M3kH
M3kH / index.js
Created March 26, 2017 12:55
Controlling While loops
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 March 26, 2017 12:58
HYF - JavaScript

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 October 11, 2015 21:41
Momo updater
#!/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 December 23, 2015 09:39
If I run inspector(window), I get all undefined, did you know why?
var inspector = function(obj){
var config = config || {},
html = '';
config.iter = function(e){
html = '<ul>';
if( typeof e === "function" ){
// setTimeout(function(){
try{