Skip to content

Instantly share code, notes, and snippets.

View suru-dissanaike's full-sized avatar

Suru Dissanaike suru-dissanaike

View GitHub Profile
ESP32 IO PIN Function Direction BME680 MH-Z19B ADXL345 Neopixel Comment
13 Application PB 1 IN N/A N/A Pull down push button
15 LED Green OUT N/A N/A LED x 3
16 LED RED OUT N/A N/A. LED x 3
17 LED Orange LED x 3, took it from Extension port
#!/bin/bash
function exec_cmd()
{
echo "executing $@"
$@ >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Failed to execute $@"
exit 1
- echo "trap example"
- |
if ! make -j$(nproc); then
make -j1 V=s > makeverbose.log || {
exitcode=$?
tail -n 100 makeverbose.log
exit ${exitcode}
};
fi
CC=gcc # gcc || clang
LIBS = -lwebsockets -ljson-c -lubox -lpthread -lblobmsg_json -lmosquitto -luci -ljson-c
all: gw-client.o
$(CC) -g gw-client.c ./utils/uci_config_loader.c ./mqtt/mqtt_handler.c $(LIBS) -o ./gw-client
clean:
rm -f gw-client *.o *.so
import { Client } from '@nerdvision/gitlab-js';
import json2md from 'json2md'
import dotenv from 'dotenv'
dotenv.config()
const fs = require('fs');
import { Command } from 'commander';
import { posix } from 'node:path';
const program = new Command();
image: node:14.16.1
stages:
- ci-report-wiki
ci-report-wiki:
stage: ci-report-wiki
variables:
# specify the filename you want to modify
FILENAME: "ci-report.md"

Report

created: 2021-06-22 17:46:38

Results from the last run.

Name Ref Status
angularmessenger master success
@suru-dissanaike
suru-dissanaike / gitlab.json
Created June 21, 2021 16:57
gitlab API example
{
"id": 278964,
"description": "GitLab is an open source end-to-end software development platform with built-in version control, issue tracking, code review, CI/CD, and more. Self-host GitLab on your own servers, in a container, or on a cloud provider.",
"name": "GitLab",
"name_with_namespace": "GitLab.org / GitLab",
"path": "gitlab",
"path_with_namespace": "gitlab-org/gitlab",
"created_at": "2015-05-20T10:47:11.949Z",
"default_branch": "master",
"tag_list": [],
#!/bin/bash
IP="192.168.1.22"
SUBJECT_CA="/C=SE/ST=Stockholm/L=Stockholm/O=himinds/OU=CA/CN=$IP"
SUBJECT_SERVER="/C=SE/ST=Stockholm/L=Stockholm/O=himinds/OU=Server/CN=$IP"
SUBJECT_CLIENT="/C=SE/ST=Stockholm/L=Stockholm/O=himinds/OU=Client/CN=$IP"
function generate_CA () {
echo "$SUBJECT_CA"
openssl req -x509 -nodes -sha256 -newkey rsa:2048 -subj "$SUBJECT_CA" -days 365 -keyout ca.key -out ca.crt
log_type all
log_facility 5
port 1883
allow_anonymous false
password_file /mosquitto/config/mosquitto.password
listener 9001
protocol websockets