Skip to content

Instantly share code, notes, and snippets.

View lixey's full-sized avatar

Lixey.Ko lixey

  • Space Сompany
  • Planet Earth
View GitHub Profile
@lixey
lixey / README.md
Created March 9, 2025 02:32 — forked from alexanderbuhler/README.md
Tailwind v4 polyfill / browser compatibility configuration

This gist may be your full solution or just the starting point for making your Tailwind v4 projects backwards compatible.

What it does

  • Convert @property rules into good old CSS vars
  • Pre-compute oklab() functions
  • Pre-compute color-mix() functions (+ replace CSS vars inside them beforehand)
  • Remove advanced instructions (colorspace) from gradients
  • Provide support for nested CSS (used by dark mode or custom variants with &)
  • Transform translate, scale, rotate properties to their transform: ... notation
  • Add whitespace to var fallbacks var(--var,) > var(--var, ) to help older browsers understand
@lixey
lixey / template.html
Created June 7, 2022 01:54 — forked from blaskovicz/template.html
Golang template features (nested variables, range over array, index into map, conditionals)
<div class="levels">
{{ $groups := .LevelGroups }}
{{ $groupedLevels := .Levels }}
{{ $completeLevels := .CompleteLevels }}
{{ if $groupedLevels }}
{{ range $group := $groups }}
<div class="intro"><h2>{{$group}}</h2></div>
{{ range index $groupedLevels $group }}
<a href="/level/{{.Number}}" class="{{if index $completeLevels .Number}}complete{{end}}">
<span class="level">{{.Number}} </span>
@lixey
lixey / mysql_forward.sh
Created August 8, 2019 14:15 — forked from eresende/mysql_forward.sh
Forward MySQL port to another IP with IPTABLES
iptables -t nat -A PREROUTING -p tcp --dport 3306 -j DNAT --to 10.0.4.172:3306
iptables -A FORWARD -p tcp -d 10.0.4.172 --dport 3306 -j ACCEPT
iptables -t nat -A POSTROUTING -j MASQUERADE
["AccumulationRegisterТоварыНаСкладах",
"AccumulationRegisterТоварыНаСкладахBalance",
"AccumulationRegisterТоварыНаСкладахBalanceandturnover",
"AccumulationRegisterТоварыНаСкладахRecordtype",
"AccumulationRegisterТоварыНаСкладахRowtype",
"AccumulationRegisterТоварыНаСкладахTurnover",
"BinaryDataQualifiers",
"CatalogАвансовыйОтчетПрисоединенныеФайлы",
"CatalogАвансовыйОтчетПрисоединенныеФайлыСертификатыШифрования",
"CatalogАвансовыйОтчетПрисоединенныеФайлыСертификатыШифрованияRowtype",
@lixey
lixey / clickhousedump
Created August 7, 2018 09:06 — forked from inkrement/clickhousedump
dump all clickhouse databases and tables
#!/bin/bash
OUTDIR=.
while read -r db ; do
while read -r table ; do
if [ "$db" == "system" ]; then
echo "skip system db"
continue 2;
#!/bin/bash
_echo() {
echo "$(date +%Y-%m-%d_%H_%M_%S) incr-refresh $1"
}
TBL='hits'
# MySQL clickhouse_changelog command
MYCL="mysql -h source_db_host mydb -BNe"
# MySQL source table command
@lixey
lixey / default
Created May 12, 2018 22:46 — forked from dtomasi/default
Brew Nginx PHP7
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
}
Install s3fs on Mac OS X
1 - Install Homebrew - http://brew.sh/
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
2 - Use Homebrew to install s3fs + dependencies
brew install s3fs
3 - Do some custom stuff. I only used the first step from here -> https://gist.github.com/fukayatsu/3910097
sudo /bin/cp -rfX /usr/local/Cellar/fuse4x-kext/0.9.2/Library/Extensions/fuse4x.kext /Library/Extensions
@lixey
lixey / droplet.sh
Created April 29, 2018 14:13 — forked from MartinAhrer/droplet.sh
Create DigitalOcean droplets
#!/usr/bin/env bash
SIZE=1gb
IMAGE=ubuntu-16-10-x64
REGION=fra1
TAG=droplet_sh
function createDroplet() {
: ${1?"Usage: createDroplet name sshkey-passphrase"}
: ${2?"Usage: createDroplet name sshkey-passphrase"}
@lixey
lixey / gist:69b4700f65d95e71c75c00774779e56c
Created April 26, 2018 20:47
Resizing a filesystem using qemu-img and fdisk

Occasionally we will deploy a virtual instance into our KVM infrastructure and realize after the fact that we need more local disk space available. This is the process we use to expand the disk image. This process assumes the following:

  • You're using legacy disk partitions. The process for LVM is similar and I will describe that in another post.
  • The partition you need to resize is the last partition on the disk.

This process will work with either a qcow2 or raw disk image. For