Install needed node packages:
npm install -g cylon-ble
npm install cylon cylon-ollie
First scan for your BB8 (the device name should contain BB in it):
> sudo cylon-ble-scan
[...]
| app.directive('customDebug', function($compile) { | |
| return { | |
| terminal: true, | |
| link: function(scope, element) { | |
| var currentElement = element.clone(); | |
| currentElement.removeAttr("custom-debug"); | |
| var newElement = $compile(currentElement)(scope); | |
| element.attr("style", "border: 1px solid red"); | |
| element.after(newElement); | |
| } |
| require.config({ | |
| paths: { | |
| 'jquery' : (function(){ | |
| if( MODE == 'DEV' ){ | |
| return 'jquery'; | |
| }else{ | |
| return 'jquery.min' | |
| } | |
| })() | |
| } |
Install needed node packages:
npm install -g cylon-ble
npm install cylon cylon-ollie
First scan for your BB8 (the device name should contain BB in it):
> sudo cylon-ble-scan
[...]
layout: post
title: Detect document ready in pure JS tip-number: 46 tip-username: loverajoel tip-username-profile: https://www.twitter.com/loverajoel tip-tldr: The cross-browser way to check if the document has loaded in pure JavaScript
categories:
Given an Array of Functions fns, what argument(s) can you pass to fns.forEach such that each function in fns will execute, in order, without creating any anonymous (or named) functions or invoking the Function constructor?
function keyword, or arrow functions () => .Function constructor.Function#bind & friends on the Function.prototype are ok.#Comprehensive Introduction to @ngrx/store By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
| import { | |
| ReactScriptLoader, | |
| ReactScriptLoaderMixin, | |
| } from 'react-script-loader'; | |
| export default class UiMap extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| scriptLoading: true, |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
var Article = require('../../../models/article');Those suck for maintenance and they're ugly.
| var crypto = require("crypto"); | |
| /** | |
| * Get the signature/digest of a supplied input string | |
| * @param data [Required] The String to encode | |
| * @param awsSecretKey [Required] Secret key shared with Amazon | |
| * @param algorithm [Optional] Encryption algorithm, defaults to sha256 | |
| * @param encoding [Optional] The output encoding. Default to base64 | |
| * @returns Str with encoded digest of the input string | |
| */ | |
| function generateHmac (data, awsSecretKey, algorithm, encoding) { |
| Am revenit cu setarile din bios pentru i7-6700k la 4,5 ghz si ram Corsair DDR4 la 3200 Mhz; | |
| Inainte totusi un mic disclaimer: aceste setari de mai jos merg la mine, nu inseamna neaparat ca vor merge pe toate sistemele cu i7 6700k; depinde din ce lot de fabricatie ati nimerit procesorul, de tipul de ram si bineinteles de versiunea de bios; | |
| Iata setarile pentru bios versiunea 1801 pe aceasta placa de baza asa cum le-am gasit eu stabile dupa 5-6 saptamani de testari: | |
| AI OVERCLOCK TUNER - Manual | |
| BCLK Frequency - 100.00 | |
| ASUS MULTICORE ENHANCEMENT - Disabled | |
| CPU CORE RATIO - SYNC ALL Cores | |
| 1-Core Ratio Limit - 45 (adica frecventa 4,5 ghz) |