Skip to content

Instantly share code, notes, and snippets.

version: "3.0"
services:
clickhouse:
image: clickhouse/clickhouse-server
ports:
- "8123:8123"
environment:
- CLICKHOUSE_USER=default
- CLICKHOUSE_PASSWORD=12345
#/etc/nginx/nginx.conf
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 10;
types_hash_max_size 2048;
proxy_connect_timeout 1200s;
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Google\Analytics\Data\V1beta\BetaAnalyticsDataClient;
use Google\Analytics\Data\V1beta\DateRange;
use Google\Analytics\Data\V1beta\Dimension;
use Google\Analytics\Data\V1beta\Metric;
use Google\Analytics\Data\V1beta\MetricType;
@zaengit
zaengit / gist:6a13f10f4ea3dfcd1b83f1412052e9c9
Created January 22, 2023 11:07
autoLoginPhpMyadmin.txt
1. open config.inc.php file from your phpmyadmin folder.
2.
$cfg['Servers'][$i]['auth_type'] = 'cookie';
change to
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'your-database-user-name';
$cfg['Servers'][$i]['password'] = 'your-database-password';
Object.defineProperty(Array.prototype, 'chunk', {
value: function(chunkSize) {
let data = this;
return [].concat.apply([],
data.map(function(el, i) {
return i % chunkSize ? [] : [data.slice(i, i + chunkSize)];
})
);
}
})
nano /etc/mysql/mysql.conf.d/mysqld.cnf
"bind-address = 127.0.0.1" change to "bind-address = 0.0.0.0"
systemctl restart mysql
mysql
CREATE USER 'root'@'%' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON *.* to 'root'@'%';
FLUSH PRIVILEGES;
<a href="https://wa.me/62812345678?text=Hello%20" class="chatWA" target="_blank">
<span class="icon">
<svg style="width:30px;height:30px" viewBox="0 0 24 24">
<path fill="currentColor" d="M12.04 2C6.58 2 2.13 6.45 2.13 11.91C2.13 13.66 2.59 15.36 3.45 16.86L2.05 22L7.3 20.62C8.75 21.41 10.38 21.83 12.04 21.83C17.5 21.83 21.95 17.38 21.95 11.92C21.95 9.27 20.92 6.78 19.05 4.91C17.18 3.03 14.69 2 12.04 2M12.05 3.67C14.25 3.67 16.31 4.53 17.87 6.09C19.42 7.65 20.28 9.72 20.28 11.92C20.28 16.46 16.58 20.15 12.04 20.15C10.56 20.15 9.11 19.76 7.85 19L7.55 18.83L4.43 19.65L5.26 16.61L5.06 16.29C4.24 15 3.8 13.47 3.8 11.91C3.81 7.37 7.5 3.67 12.05 3.67M8.53 7.33C8.37 7.33 8.1 7.39 7.87 7.64C7.65 7.89 7 8.5 7 9.71C7 10.93 7.89 12.1 8 12.27C8.14 12.44 9.76 14.94 12.25 16C12.84 16.27 13.3 16.42 13.66 16.53C14.25 16.72 14.79 16.69 15.22 16.63C15.7 16.56 16.68 16.03 16.89 15.45C17.1 14.87 17.1 14.38 17.04 14.27C16.97 14.17 16.81 14.11 16.56 14C16.31 13.86 15.09 13.26 14.87 13.18C14.64 1
<ul class="grid-uniform">
{% for link in linklists.links %}
<li class="grid__item small--one-third medium--one-fifth">
<a href="{{ link.url }}">
{% if link.type == "collection_link" and link.object.image %}
{{ link.object.image | img_url: 'small' | img_tag }}
{% endif %}
{{ link.title }}
</a>
</li>
scroll () {
window.onscroll = () => {
let bottomOfWindow = document.documentElement.scrollTop + window.innerHeight === document.documentElement.offsetHeight;
if (bottomOfWindow) {
if(this.nextPage){
if(!this.maxPage){
this.loadingInfinite = true
}
setTimeout(() => {
if(!this.maxPage){
du -sh /var/* | sort -n