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
rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/usr/tmp/*","/run/*","/mnt/*","/media/*","/var/cache/*","/","/lost+found"} /* /path/to/some/backup/folder |
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
#include <string> | |
#include <Arduino.h> | |
#define IR_RECEIVE_PIN 10 | |
#if !defined(RAW_BUFFER_LENGTH) | |
#if RAMEND <= 0x4FF || RAMSIZE < 0x4FF | |
#define RAW_BUFFER_LENGTH 200 // 750 (600 if we have only 2k RAM) is the value for air condition remotes. Default is 112 if DECODE_MAGIQUEST is enabled, otherwise 100. | |
#elif RAMEND <= 0x8FF || RAMSIZE < 0x8FF | |
#define RAW_BUFFER_LENGTH 600 // 750 (600 if we have only 2k RAM) is the value for air condition remotes. Default is 112 if DECODE_MAGIQUEST is enabled, otherwise 100. | |
#else |
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
import axios from "axios"; | |
import axiosRetry from "axios-retry"; | |
import { statusById } from "./wallbox/chargerStatuses"; | |
class Wallbox { | |
private _token?: string; | |
private _client = axios.create({ | |
baseURL: "https://api.wall-box.com", |
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
ActionMailer::Base.mail(from: "[email protected]", to: '[email protected]', subject: 'test', body: "Test").deliver |
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
CREATE DATABASE database; | |
CREATE USER 'username'@'%' IDENTIFIED WITH authentication_plugin BY 'password'; | |
# Or | |
CREATE USER 'username'@'%' IDENTIFIED WITH mysql_native_password BY 'password'; | |
GRANT ALL ON database.* TO 'username'@'%'; | |
FLUSH PRIVILEGES |
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
'use strict'; | |
/* | |
* Complete the 'strokesRequired' function below. | |
* | |
* The function is expected to return an INTEGER. | |
* The function accepts STRING_ARRAY picture as parameter. | |
*/ | |
function strokesRequired(picture) { | |
// Write your code here |
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
function strokesRequired(picture) { | |
var strokes = 0; | |
while (true) { | |
// Find the next truthy cell and extract x and y | |
const next = picture.flatMap((row, x) => row.flatMap((char, y) => (char && { char, x, y }))).filter(r => r)[0]; | |
if (!next) { // None left means the picture is filled | |
break; | |
} | |
const remove = [[next.x, next.y]]; // We will remove the current cell after | |
eliminateNeighbours(picture, [], remove, next.char, next.x, next.y); |
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
name: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
core_a: ["STM32"] | |
core_b: ["stm32"] | |
board: ["Nucleo_144"] | |
opts: ["pnum=NUCLEO_F767ZI,upload_method=MassStorage,xserial=generic,usb=none,xusb=FS,opt=osstd,rtlib=nano"] |
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
rsync -aAXv --progress --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/usr/tmp/*","/run/*","/mnt/*","/media/*","/var/cache/*","/","/lost+found","/backup"} /* /backup/ |
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
Mongoid.default_client.collections.each(&:drop) |
NewerOlder