Skip to content

Instantly share code, notes, and snippets.

## Editing coredns config.
1. Get config into a file.
d kubectl get configmap coredns -n kube-system --output yaml > coredns_config.yaml
2. Modify the file.
Replacing:
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
pid_t server_pid;
int index = 0, bit_index = 0, checksum = 0;
char* str;
## Description
Trying to run training, I get the following error:
```
Check failed: (dataset->num_total_features_) == (static_cast<int>(feature_names_.size())) at /home/arthur/dev/btc/LightGBM/src/io/dataset_loader.cpp, line 1100 .
```
The full output of the command:
@arthurwolf
arthurwolf / screen.sh
Created April 13, 2023 20:00
Screen session setup for Wire test deploy
#!/bin/bash
# Usage:
# chmod +x screen.sh
# ./screen.sh
# Allow password-less sudo
# This is necessary for the virsh commands to work without password input for the sudo, or they break.
sudo sed -i 's/\(^%sudo\s\+ALL=(ALL[:]\?ALL)\s\+\)/\1NOPASSWD: /' /etc/sudoers
#!/bin/bash
# This script is intended for use by on-premise users of the Wire (wire.com) backend.
# The script gathers information on the installation and system, and packages that information for easy transmission to the wire Support team, in order to assist with debugging issues.
# Hello.
echo "# Begin Wire information gathering"
# Ensure we are running in sudo mode.
echo "# Ensuring we are in sudo mode"
// Sort the results from best to worst
sort(results){
// Skip and limit
let limit = new Number(this.sort_limit);
let skip = new Number(this.sort_skip);
if(skip > limit) skip = limit;
// Fix negative lows
results = results = results.map(r => {r.low = Math.max(0, r.low); return r;});
@arthurwolf
arthurwolf / dates.json
Created March 31, 2022 14:02
Matching wire-server release dates and chart versions (chart tag, image/deb tag when it's absent)
{
'2022-03-30': '4.8.0',
'2022-03-18': '4.7.0',
'2022-03-09': '4.6.0',
'2022-03-07': '4.5.0',
'2022-03-01': '4.4.0',
'2022-02-21': '4.2.0',
'2022-02-02': '4.0.0',
'2022-01-28': '2.125.0',
'2022-01-27': '2.124.0',
// Yay we connected
global.page.log('Connected to database!');
{
"name": "wikipedia",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@google-cloud/text-to-speech": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@google-cloud/text-to-speech/-/text-to-speech-3.0.0.tgz",
"integrity": "sha512-mtNWZ2AJfC+LmL06yGuDmlr73briZ1cV7f3z+h7DmKpx+0D5/bF916y7vRd9D15MfU9yIHQ6UffveWEEa3MFKQ==",
# Smoothieboard configuration file, see http://smoothieware.org/configuring-smoothie
# NOTE Lines must not exceed 132 characters, and '#' characters mean what follows is ignored
## Robot module configurations : general handling of movement G-codes and slicing into moves
# Basic motion configuration
default_feed_rate 4000 # Default speed (mm/minute) for G1/G2/G3 moves
default_seek_rate 4000 # Default speed (mm/minute) for G0 moves
mm_max_arc_error 0.01 # The maximum error for line segments that divide arcs 0 to disable
# note it is invalid for both the above be 0
# if both are used, will use largest segment length based on radius