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
[mysqld] | |
sql_mode=ONLY_FULL_GROUP_BY,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | |
pid-file = /var/run/mysqld/mysqld.pid | |
socket = /var/run/mysqld/mysqld.sock | |
datadir = /var/lib/mysql | |
#log-error = /var/log/mysql/error.log | |
# By default we only accept connections from localhost | |
#bind-address = 127.0.0.1 | |
# Disabling symbolic-links is recommended to prevent assorted security risks | |
symbolic-links=0 |
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
1. difference between array vs slice | |
1.a. mechanics of 'append' | |
docker run -d \ | |
--name tbtest \ | |
-p 9090:9090 \ | |
--restart always \ | |
thingsboard/tb | |
ACCESS TOKEN: Ukbj2ZHfxSVhEeEqENiW |
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 | |
STATUS=`gsettings get org.gnome.desktop.peripherals.touchpad send-events` | |
if [ "$STATUS" = "'enabled'" ] | |
then | |
gsettings set org.gnome.desktop.peripherals.touchpad send-events 'disabled' | |
else | |
gsettings set org.gnome.desktop.peripherals.touchpad send-events 'enabled' | |
fi |
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
[global_config] | |
suppress_multiple_term_dialog = True | |
title_receive_bg_color = "#729fcf" | |
title_transmit_bg_color = "#204a87" | |
[keybindings] | |
[layouts] | |
[[default]] | |
[[[child1]]] | |
parent = window0 | |
profile = default |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
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 sql = require('mssql') | |
const connstring = "mssql://wadezig:[email protected]/dbnamehere?encrypt=true" | |
const test = async function (context, req) { | |
let pool = await sql.connect(connstring) | |
let result = await pool.request() | |
.input('from', sql.VarChar(255), 'fromval') | |
.input('to', sql.VarChar(255), 'toval') | |
.query('insert into referrer (url_from, url_to) values (@from, @to)') |
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
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
class BrowseController extends Controller | |
{ | |
// dattable cacher |
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 | |
notify() { | |
user_id=<your tele id> | |
bot_token=<your tele bot token> | |
message=$1 | |
curl --data chat_id="${user_id}" \ | |
--data "text=${message}" \ | |
"https://api.telegram.org/bot${bot_token}/sendMessage" | |
} |
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 cluster = require('cluster'); | |
const http = require('http'); | |
const numCPUs = require('os').cpus().length; | |
const express = require('express'); | |
const loki = require('lokijs'); | |
var app = express(); | |
var db = new loki('test'); | |