This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Author: Edoardo Paolo Scalafiotti <edoardo849@gmail.com> | |
import os | |
from time import sleep | |
import signal | |
import sys | |
import RPi.GPIO as GPIO | |
pin = 12 # The pin ID, edit here to change it | |
maxTMP = 55 # The maximum temperature in Celsius after which we trigger the fan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: '<%= fontName %>'; | |
src: url('<%= fontPath %><%= fontName %>.eot'); | |
src: url('<%= fontPath %><%= fontName %>.eot?#iefix') format('embedded-opentype'), | |
url('<%= fontPath %><%= fontName %>.woff') format('woff'), | |
url('<%= fontPath %><%= fontName %>.ttf') format('truetype'), | |
url('<%= fontPath %><%= fontName %>.svg#<%= fontName %>') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
let config = { | |
apiProxy: process.env.PROXY || 'http://0.0.0.0:3002' | |
}; | |
//============================================= | |
// DEPENDENCIES | |
//============================================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm up -D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var findNodes = function (callback) { | |
var i = 100000, | |
nodes = [], | |
found; | |
// проверить, является ли объект callback функцией | |
if (typeof callback !== 'function') { | |
callback = false; | |
} | |
while (i) { | |
i -= 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function f() { | |
g.apply(this, arguments); | |
} | |
function g(a) { | |
arguments.sort = [].sort; | |
arguments.join = [].join; | |
console.log(arguments.join(" ; ")); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
// произошло что-то неприятное, возбудить ошибку | |
throw { | |
name: “MyErrorType”, | |
// нестандартный тип ошибки | |
message: “oops”, | |
extra: “This was rather embarrassing”, | |
remedy: genericErrorHandler // какой обработчик | |
// должен обрабатывать ошибку | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//модуль | |
var basketModule = (function() { | |
var basket = []; // приватная переменная | |
return { // методы доступные извне | |
addItem: function(values) { | |
basket.push(values); | |
}, | |
getItemCount: function() { | |
return basket.length; | |
}, |