Skip to content

Instantly share code, notes, and snippets.

View tworzenieweb's full-sized avatar

Łukasz Adamczewski tworzenieweb

View GitHub Profile
@splacento-incomm
splacento-incomm / gist:a2895551d36f66b3e715286ae232767a
Last active July 27, 2023 09:34
Find all system files in mysql db FTS issue
magento2 db server was crashing and we had to investigate why.
Long story short: it ran out of space. 220GB ssd with 0 bytes free.
Mysql folder size 70GB while db itself is somewhere near 300MB.
So most of space was used by:
FTS_0000000000274d82_000000000031bd04_INDEX_1.ibd
FTS_0000000000274d82_000000000031bd04_INDEX_2.ibd
FTS_0000000000274d82_000000000031bd04_INDEX_3.ibd
FTS_0000000000274d82_000000000031bd04_INDEX_4.ibd
FTS_0000000000274d82_000000000031bd04_INDEX_5.ibd
FTS_0000000000274d82_000000000031bd04_INDEX_6.ibd
@qzed
qzed / Pipfile
Last active April 23, 2021 16:10
Surface Book 2 / Surface Pro (2017) / Surface Laptop UART protocol proof-of-concept script.
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
crcmod = "*"
pyserial = "*"
[dev-packages]
@johnramsden
johnramsden / arch-linux-basic-surface.md
Last active January 27, 2023 19:33
Basic arch linux install on surface

Arch Linux Install on the Surface Pro 4

From blog post Arch Linux on The Surface Pro 4. Created for Jordi Higuera

If you do have access to a hub, and you have physical access to the machine, letting you plug a keyboard in, you're probably better off using a fresh install ISO. From the Arch Download page download an up to date ISO.

Partitioning

If you've already gone through the steps of shrinking your SSD to give you some extra room on your SSD, once you've booted in to the ISO run lsblk you should see something like this:

@garak
garak / README.md
Last active May 14, 2022 01:45
bitbucket pipeline configuration for a Symfony project

This configuration is for a project running Symfony (2 or 3)

I did the image after not founding anything suitable (it was a quick search). If you found a better one, tell me.

The parameter.yml.dist file is supposed to contain sensible default values. Only the password is replaced at runtime. If you need to replace other values, just add other sed commands to the script node.

I load fixtures before running tests because I rely on a "load once" strategy (I use a bundle to revert all changes done by my tests). If you prefer to load fixtures inside your tests, you can remove thas command from script

@dvershinin
dvershinin / magento.vcl
Last active August 24, 2022 08:50
Magento 2 VCL file for Varnish 4.x: supports multiple stores better, allows purging arbitrary URLs https://www.getpagespeed.com/web-apps/magento/varnish-vcl-magento-2
vcl 4.0;
import std;
# The minimal Varnish version is 4.0
# For SSL offloading, pass the following header in your proxy server or load balancer: 'X-Forwarded-Proto: https'
backend default {
.host = "localhost";
.port = "8080";
.first_byte_timeout = 600s;
@grfiv
grfiv / convert_mysql_to_sqlite3.sh
Created September 4, 2016 19:29
convert a mysql database to sqlite3
#!/bin/bash
#
# convert a mysql database to sqlite3
#
#see https://stackoverflow.com/questions/5164033/
# export-a-mysql-database-to-sqlite-database
mysql_host=localhost
mysql_user=george
#mysql_passwd=****************
@GabLeRoux
GabLeRoux / archlinux-virtualbox.sh
Last active November 27, 2023 12:22
Virtualbox archlinux notes
# sudo /sbin/rcvboxdrv -h
# Unloading modules:
# Loading modules: modprobe: FATAL: Module vboxnetadp not found in directory /lib/modules/4.4.3-1-ARCH
# modprobe: FATAL: Module vboxnetflt not found in directory /lib/modules/4.4.3-1-ARCH
# modprobe: FATAL: Module vboxpci not found in directory /lib/modules/4.4.3-1-ARCH
# modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/4.4.3-1-ARCH
# Solution
# from https://forum.antergos.com/topic/818/can-t-run-my-vitualbox/4
@SiZapPaaiGwat
SiZapPaaiGwat / webpack.nginx.conf
Last active November 19, 2021 19:10
webpack-dev-server configuration in nginx on development server
upstream ws_server {
server 127.0.0.1:8080;
}
server {
listen 80;
server_name 10.1.2.225;
location / {
proxy_pass http://ws_server/;
@kennwhite
kennwhite / multi_key_crypto.sh
Last active January 16, 2024 15:47
OpenSSL command line recipe for multi-public key file encryption. Any single private key paired to one of the public keys can decrypt the file.
#!/usr/bin/env bash
#
# Example of multiple key AES encryption for text files using the openssl v. 0.9.8+ command line utility
# Uses n public certs as key for MIME PKCS envelope, any individual private key can decrypt.
#
# If standard RSA ssh keys exist, these can be converted to public certs as well (and ssh keys can decrypt)
#
# To sign (and verify) the encrypted file, one of the private keys is required, see:
# http://www.openssl.org/docs/apps/smime.html#EXAMPLES for openssl smime examples
# or http://www.openssl.org/docs/apps/cms.html#EXAMPLES for cms utility (OpenSSL v. 1.0+)
@esfand
esfand / typescript_angular.adoc
Last active September 30, 2022 12:37
AngularJS with TypeScript