Instantly share code, notes, and snippets.

View build.js
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"+rLv":function(e,t,n){var r=n("dyZX").document;e.exports=r&&r.documentElement},"0/R4":function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},"0TWp":function(e,t,n){!function(){"use strict";!function(e){var t=e.performance;function n(e){t&&t.mark&&t.mark(e)}function r(e,n){t&&t.measure&&t.measure(e,n)}if(n("Zone"),e.Zone)throw new Error("Zone already loaded.");var o,i=function(){function t(e,t){this._properties=null,this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new s(this,this._parent&&this._parent._zoneDelegate,t)}return t.assertZonePatched=function(){if(e.Promise!==x.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one,
View bundle.js
!function(r){function e(e){for(var t,p,c=e[0],a=e[1],f=e[2],l=0,s=[];l<c.length;l++)o[p=c[l]]&&s.push(o[p][0]),o[p]=0;for(t in a)Object.prototype.hasOwnProperty.call(a,t)&&(r[t]=a[t]);for(i&&i(e);s.length;)s.shift()();return u.push.apply(u,f||[]),n()}function n(){for(var r,e=0;e<u.length;e++){for(var n=u[e],t=!0,c=1;c<n.length;c++)0!==o[n[c]]&&(t=!1);t&&(u.splice(e--,1),r=p(p.s=n[0]))}return r}var t={},o={0:0},u=[];function p(e){if(t[e])return t[e].exports;var n=t[e]={i:e,l:!1,exports:{}};return r[e].call(n.exports,n,n.exports,p),n.l=!0,n.exports}p.m=r,p.c=t,p.d=function(r,e,n){p.o(r,e)||Object.defineProperty(r,e,{configurable:!1,enumerable:!0,get:n})},p.r=function(r){Object.defineProperty(r,"__esModule",{value:!0})},p.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return p.d(e,"a",e),e},p.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},p.p="";var c=window.webpackJsonp=window.webpackJsonp||[],a=c.push.bind(c);c.push=e,c=c.slice();for(var f=0;f<c.length;
View ejemplo-elements.js
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,u){for(var i,a,f,l=0,s=[];l<r.length;l++)t[a=r[l]]&&s.push(t[a][0]),t[a]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(n&&n(r,c,u);s.length;)s.shift()();if(u)for(l=0;l<u.length;l++)f=o(o.s=u[l]);return f};var r={},t={3:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],u=document.createElement("script");u.type="text/javascript",u.charset="utf-8",u.async=!0,u.timeout=12e4,o.nc&&u.setAttribute("nonce",o.nc),u.src=o.p+""+e+".chunk.js";var i=setTimeout(a,12e4);function a(){u.onerror=u.onload=null,clearTimeout(i);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return u.onerror=u.onload=a,c.appendChild(u),r},o.m=e
View autolevel.md

Instalando el sensor

Lo primero será imprimir el soporte, y para ello en vez de usar el soporte ofrecido por skynet, vamos a usar uno alternativo de thingiverse.

Para sensores de 18mm (LJ18A3-8-Z/BX -- LJC18A3-H-Z/BY) necesitáis la pieza de 18mm que se instalará entre el ventilador y el disipador:

// FALTA FOTO, TENGO QUE INSTALAR EL SOPORTE NUEVO

También tendremos que conectarlo a la placa en lugar del final de carrera Z:

View nginx-vhost
upstream api_node_js {
server 127.0.0.1:8080;
}
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/my-kickass-domain/public_html;
index index.html index.htm;
View modulepattern.md

Scopes en Javascript:

Si haces algo en plan:

var a = 10;

function foo() {
  console.log(a);
}
View backend.js
angular.module('plunker')
.config(function($provide) {
$provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator);
})
.run(function($httpBackend) {
var things = [
{
id: 0,
title: 'Finish fake backend',
View app.conf
server {
server_name mroot.local;
root /var/www/laravel/mroot/client/tmp;
location / {
index index.html;
try_files $uri $uri/ /index.html =404;
}
location /api {
View laraveldemo.skema
[{"name":"User","color":"Red","position":{"x":100,"y":100},"increment":true,"timestamp":true,"softdelete":false,"column":[{"name":"Name","type":"string","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":false,"guarded":false,"visible":false,"hidden":false,"colid":"c23","order":0}],"relation":[{"extramethods":"","foreignkeys":"","name":"gadgets","relatedmodel":"Gadget","relationtype":"hasMany","usenamespace":""}],"seeding":[]},{"name":"Gadget","color":"Blue","position":{"x":872,"y":48},"increment":true,"timestamp":true,"softdelete":false,"column":[{"name":"Name","type":"string","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":false,"guarded":false,"visible":false,"hidden":false,"colid":"c40","order":0}],"relation":[{"extramethods":"","foreignkeys":"","name":"owner","relatedmodel":"User","relationtype":"belongsTo","usenamespace":""}],"seeding":[]}]
View post-receive
#!/bin/sh
read oldrev newrev refname
LOGFILE=./post-receive.log
DEPLOYDIR=/var/www/lineman/project
echo -e "Received Push Request a $( date +%F )" >> $LOGFILE
echo " - Old SHA: $oldrev New SHA: $newrev Branch Name: $refname" >> $LOGFILE