This file contains 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 | |
for i in $(hass-cli entity list "living_room_recessed_lights*" |awk '{print $1}' | grep -v ENTITY_ID) | |
do | |
NEW_ID=$(echo $i | sed 's/living_room_recessed_lights/living_room_fireplace_recessed_lights/') | |
echo "hass-cli entity rename ${i} ${NEW_ID}" | |
# hass-cli entity rename ${i} ${NEW_ID} | |
done |
This file contains 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
<?php | |
include ('inc/init.php'); | |
$tabhandler['reports']['cableid'] = 'renderCableIdReport'; // register a report rendering function | |
$tab['reports']['cableid'] = 'Cable IDs'; // title of the report tab | |
function renderCableIdReport() | |
{ | |
global $dbxlink; | |
$sql = "SELECT Link.*, porta.id as porta_id, porta.name as porta_name, objecta.id as objecta_id, objecta.name as objecta_name, portb.id as portb_id, portb.name as portb_name, objectb.id as objectb_id, objectb.name as objectb_name |
This file contains 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
❯ nrfutil settings display nrf-cgg1-stock-1.1.2_0020.hex | |
Bootloader DFU Settings: | |
* File: nrf-cgg1-stock-1.1.2_0020.hex | |
* Family: nRF52 | |
* Start Address: 0x00000000 | |
* CRC: 0x4EE9A698 | |
* Settings Version: 0x00000001 (1) | |
* App Version: 0x000000FF (255) | |
* Bootloader Version: 0x00000000 (0) |
This file contains 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 hasDelinquencies = () => true; | |
const hasInsufficientFunds = () => false; | |
const generateDisqualificationStates = (name, condition) => ({ | |
[name]: { | |
initial: 'evaluating', | |
states: { | |
evaluating: { | |
on: { | |
EVALUATE_DISQUALIFICATION: [ |
This file contains 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 hasDelinquencies = () => true; | |
const hasInsufficientFunds = () => false; | |
const financialPlanMachine = Machine({ | |
id: 'financialPlan', | |
initial: 'checkingForDisqualification', | |
states: { | |
checkingForDisqualification: { | |
on: { | |
FINISH_DISQUALIFICATION: [ |
This file contains 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 questionFactory = require('./questionFactory'); | |
const generalQuestionConfig = require('./generalConfig'); | |
const processedConfig = questionFactory('general', generalQuestionConfig); | |
module.exports = Object.keys(processedConfig) | |
.map(key => `export const ${key} = ${JSON.stringify(processedConfig[key])}`) | |
.join(';'); |
This file contains 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
version: '2' | |
services: | |
consul: | |
image: consul:latest | |
stdin_open: true | |
tty: true | |
ports: | |
- 8500/tcp | |
command: | |
- consul |
This file contains 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
<?php | |
class Helper { | |
static function getIfSet(& $var) { | |
if (isset($var)) { | |
return $var; | |
} | |
return null; | |
} | |
} |
This file contains 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
variables: | |
COMPOSE_FILE: "docker-compose.rancher.yml" | |
TRAEFIK_ENABLED: "true" | |
STACK_NAME: $CI_PROJECT_NAME-$CI_COMMIT_REF_SLUG | |
stages: | |
- build | |
- deploy | |
- cleanup |
This file contains 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
version: '2' | |
services: | |
gitlab-runner-config: | |
image: gitlab/gitlab-runner:alpine | |
stdin_open: true | |
volumes: | |
- /etc/gitlab-runner/ | |
tty: true | |
command: | |
- register |
NewerOlder