Skip to content

Instantly share code, notes, and snippets.

View mcharytoniuk's full-sized avatar
🔳
ᕕ( ᐛ )ᕗ

Mateusz Charytoniuk mcharytoniuk

🔳
ᕕ( ᐛ )ᕗ
View GitHub Profile
@mcharytoniuk
mcharytoniuk / README.md
Last active March 28, 2024 22:20
php extension in zig

To build it:

  1. zig build
  2. phpize
  3. ./configure
  4. make

To test it:

php -d extension=./modules/my_php_extension.so -r "echo hello_world();"

@mcharytoniuk
mcharytoniuk / Cargo.toml
Created January 20, 2024 13:30
PHP + Candle proof of concept
[package]
name = "hello_world"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = ["cdylib"]
[dependencies]
anyhow = "*"
@mcharytoniuk
mcharytoniuk / Makefile
Last active December 22, 2023 17:43
Create self-signed certificate for local development.
PASS=yourcertificatemasterpassword
SUBJ=/C=PL/ST=MyState/L=MyLocation/O=MyOrganization/OU=MyOrganisationUnit/CN=localhost/emailAddress=admin@localhost
# Targets
localhostCA.crt: localhostCA.pem
openssl x509 \
-in localhostCA.pem \
-inform PEM \
-out localhostCA.crt
@mcharytoniuk
mcharytoniuk / .footprint
Last active October 9, 2019 14:47
crux port: protonvpn-cli
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/openvpn/
-rwxr-xr-x root/root etc/openvpn/update-resolv-conf
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/protonvpn-cli
lrwxrwxrwx root/root usr/bin/pvpn -> /usr/bin/protonvpn-cli
@mcharytoniuk
mcharytoniuk / .footprint
Last active September 28, 2019 15:05
crux - port -imwheel
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/X11/
drwxr-xr-x root/root etc/X11/imwheel/
-rw-r--r-- root/root etc/X11/imwheel/imwheelrc
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/imwheel
drwxr-xr-x root/root usr/share/
drwxr-xr-x root/root usr/share/man/
drwxr-xr-x root/root usr/share/man/man1/
/* Slider */
.foo-slider
{
opacity: 0;
// overflow: hidden;
transition: opacity 0.3s ease-in-out;
}
.foo-slider.slick-slider
{
"always_show_minimap_viewport": true,
"animation_enabled": false,
"caret_style": "phase",
"block_caret": true,
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
"default_line_ending": "unix",
"draw_centered": false,
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
@mcharytoniuk
mcharytoniuk / filename2md5.sh
Created January 19, 2018 22:11
replace filenames with file's md5 sum
ls -1 -A | while IFS= read FILE; do
EXTNAME=`echo $FILE | rev | cut -f 1 -d '.' | rev`;
# https://stackoverflow.com/questions/3679296/only-get-hash-value-using-md5sum-without-filename
NEWNAME=`md5sum "$FILE" | awk '{ print $1 }'`\.$EXTNAME;
mv "$FILE" $NEWNAME;
done
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlueColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECYw
LjI1MDk4MDQwNyAwLjQ3NDUwOTgzNTIgMC42OTQxMTc2NjUzABACgALSEBESE1okY2xh
c3NuYW1lWCRjbGFzc2VzV05TQ29sb3KiEhRYTlNPYmplY3RfEA9OU0tleWVkQXJjaGl2
@mcharytoniuk
mcharytoniuk / Vagrantfile
Last active April 30, 2021 05:00
Vagrant + docker-compose
Vagrant.configure(2) do |config|
config.vm.box = "phusion/ubuntu-14.04-amd64"
config.vm.network "forwarded_port", guest: 3306, host: 3306
# If errors occur, try running "vagrant provision" manually
# after "vagrant up"
config.vm.provision :docker
# To use docker_compose as a provisioning tool, install
# vagrant-docker-compose plugin first. It should also solve the