This file contains hidden or 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
    
  
  
    
  | let data = { | |
| "temple" : { | |
| "templeLeft": { | |
| "random" : 0 | |
| }, | |
| "templeRight": 42 | |
| } | |
| } | |
| //find a property called "random" | 
  
    
      This file contains hidden or 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
    
  
  
    
  | // Copyright 2018 Google Inc. | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // http://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, software | |
| // distributed under the License is distributed on an "AS IS" BASIS, | 
  
    
      This file contains hidden or 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
    
  
  
    
  | import * as fs from "fs" | |
| function parse(x) { | |
| return x.replace(".", ",") | |
| } | |
| await fs.readFile("./stuff.txt", "utf8", async (error, data) => { | |
| if (error) { | |
| console.log("unable to load input.txt") | 
  
    
      This file contains hidden or 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
    
  
  
    
  | git branch | grep -v "master" | xargs git branch -D | 
  
    
      This file contains hidden or 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
    
  
  
    
  | logaddress_add 1 | 
  
    
      This file contains hidden or 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
    
  
  
    
  | /** | |
| * Integration between PIR, Ultrasonic sensor and motor. plus LEDs! | |
| * | |
| * PIR awakes Sonar; Sonar triggers Vibrators and NeoLED | |
| * | |
| */ | |
| #include <Adafruit_NeoPixel.h> | |
| // PIR | |
| const int PIN_PIR_INPUT = 3; | 
  
    
      This file contains hidden or 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
    
  
  
    
  | #include <Adafruit_NeoPixel.h> | |
| #define PIN 8 | |
| #define NUM_LEDS 1 | |
| //create a NeoPixel strip | |
| Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN, NEO_GRB + NEO_KHZ800); | |
| int colors[] = {0, 0, 0}; | |
| int colorsInc[] = {1, 1, 1}; | |
| int colorsIndex = random(3); | 
  
    
      This file contains hidden or 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
    
  
  
    
  | import RPi.GPIO as GPIO | |
| import time | |
| GPIO.setmode(GPIO.BCM) | |
| GPIO.setwarnings(False) | |
| GPIO.setup(18,GPIO.OUT) | |
| while True: | |
| print "LED on" | |
| GPIO.output(18,GPIO.HIGH) | |
| time.sleep(1) | 
  
    
      This file contains hidden or 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
    
  
  
    
  | /** | |
| * Integration between PIR, Ultrasonic sensor and motor. plus LEDs! | |
| * | |
| */ | |
| const int PIN_PIR_INPUT = 10; | |
| const int PIN_SONAR_TRIGGER = 6; // Input | |
| const int PIN_SONAR_ECHO = 9; // Output | |
| const int PIN_SONAR_SUPPLY = 9; | 
  
    
      This file contains hidden or 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
    
  
  
    
  | #define NOTE_B0 31 | |
| #define NOTE_C1 33 | |
| #define NOTE_CS1 35 | |
| #define NOTE_D1 37 | |
| #define NOTE_DS1 39 | |
| #define NOTE_E1 41 | |
| #define NOTE_F1 44 | |
| #define NOTE_FS1 46 | |
| #define NOTE_G1 49 | |
| #define NOTE_GS1 52 | 
NewerOlder