wget https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz
tar zxvf node_exporter-0.18.1.linux-amd64.tar.gz
cp node_exporter-0.18.1.linux-amd64/node_exporter /usr/local/bin/node_exporter
vim /etc/systemd/system/node_exporter.service
systemctl daemon-reload
systemctl start node_exporter.service
systemctl enable node_exporter.service
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
| #!/bin/bash | |
| # led_control.sh - Wedge100BF-32X LED control based on SONiC port state | |
| # Runs on HOST, executes bfshell via docker exec into syncd container | |
| # | |
| # Usage: | |
| # ./led_control.sh # one-shot update | |
| # ./led_control.sh --watch # continuous monitoring (every 5 seconds) | |
| # ./led_control.sh --off # all LEDs off | |
| # | |
| # LED color codes: |
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
| # remove KnoenHosts | |
| term_.command.removeAllKnownHosts(); |
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
| const Sequelize = require('sequelize'); | |
| const sequelize = new Sequelize( | |
| 'database', '', '', { | |
| dialect: 'sqlite', | |
| storage: __dirname + '/main.sqlite3', | |
| } | |
| ); | |
| const Product = sequelize.define('products', | |
| { |
If someone forks a gist and you'd like to merge their changes. Do this:
-
clone your repo, I use the name of the gist
git clone git@gist.github.com:1166108.git -
add a remote for the forked gist, I'm using the name of my fellow developer
git remote add aaron git@gist.github.com:83e037bb8af86fe476d11c8201737ccf.git
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
| // Wire - Version: Latest | |
| #include <Wire.h> | |
| // 各DACのアドレス | |
| #define AK449X2_J12L_U2_ADDR (0x10) // CAD1 0 CAD2 0 J12 = 2-3 U2 | |
| #define AK449X2_J12L_U1_ADDR (0x11) // CAD1 0 CAD2 1 J12 = 2-3 U1 | |
| #define AK449X2_J12H_U2_ADDR (0x12) // CAD1 1 CAD2 0 J12 = 1-2 U2 | |
| #define AK449X2_J12H_U1_ADDR (0x13) // CAD1 1 CAD2 1 J12 = 1-2 U1 | |
| // ボリューム |
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 <ESP8266WiFi.h> | |
| #include <WiFiClientSecure.h> | |
| #include <time.h> | |
| #include <PubSubClient.h> | |
| // WiFi | |
| #define STASSID "wlanAP" | |
| #define STAPSK "wlanPSK" | |
| // MQTT |
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
| // Wire - Version: Latest | |
| #include <Wire.h> | |
| // 各DACのアドレス | |
| #define AK449X2_J12L_U2_ADDR (0x10) // CAD1 0 CAD2 0 J12 = 2-3 U2 | |
| #define AK449X2_J12L_U1_ADDR (0x11) // CAD1 0 CAD2 1 J12 = 2-3 U1 | |
| #define AK449X2_J12H_U2_ADDR (0x12) // CAD1 1 CAD2 0 J12 = 1-2 U2 | |
| #define AK449X2_J12H_U1_ADDR (0x13) // CAD1 1 CAD2 1 J12 = 1-2 U1 | |
| // 切り替え検出に使うDDCのピン |
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
| 00H 10001111 32bit i2s, RST Disable,MCLK Auto Set | |
| 01H 00100010 Default | |
| 02H 00000000 Default (MonoMode L 00001000 R 00001010) | |
| 03H 11111111 Default Lch 0dB | |
| 04H 11111111 Default Rch 0dB | |
| 05H 00000000 Default | |
| 06H 00000000 Default | |
| 07H 00000001 Default | |
| 08H 00000000 Default | |
| 09H 00000000 Default |
NewerOlder