Skip to content

Instantly share code, notes, and snippets.

View Skatox's full-sized avatar
🏠
Working from home

Miguel Useche Skatox

🏠
Working from home
View GitHub Profile
@lennardv2
lennardv2 / 1. Building PHP-MAMP on Apple Silicon M1.md
Last active February 29, 2024 07:57
Native PHP development / MAMP stack on Apple silicon M1

Building the MAMP stack (php, apache & mysql) on Apple Silicon ARM (native)

Update! This tutorial is outdated. Nowadays brew installes m1 binaries just fine. Also use valet: https://laravel.com/docs/9.x/valet. It's 10x easier.

In this tutorial, we'll build the the nescessary packages for ARM via homebrew. After that we'll configure apache2 for using virtual hosts. The native php is ofcourse way faster, see the results of this benchmark below.

TEST NAME SECONDS OP/SEC
@dianjuar
dianjuar / interviewer-questions.md
Last active March 20, 2023 17:34
List for questions to make in an interview

Role

  • How did this position come to be open?
  • What would my immediate priorities be?
  • What is the performance review process like here?
  • What are the most important skills to have to do well in this job?
  • What is the typical career path for someone in this role?
  • What are the biggest challenges that someone in this position would face?
  • Can you show me examples of projects I would be working on?
  • How will my performance be reviewed? how often? what metrics will be used?
  • When and how is feedback given to me as an employee? (one to one, polls)
@midudev
midudev / animations.sh
Last active January 12, 2021 17:47
Make your OSX great again
# sh ./animations.sh
# set keyboard repeat rate to 0, so instant
defaults write -g InitialKeyRepeat -int 10 # normal minimum is 15 (225 ms)
defaults write -g KeyRepeat -int 1 # normal minimum is 2 (30 ms)
# instant quick look animation
defaults write -g QLPanelAnimationDuration -float 0
# increase speed of animation when resizing window of Cocoa apps
@dianjuar
dianjuar / How to make a WordPress plugin require another plugin.md
Last active July 18, 2023 19:27
Make a WordPress plugin dependent of another plugin

How to make WordPress a plugin require another plugin?

Put this function on the main php file of your dependent plugin and call it with the rigth parameters.

/**
 * Verify if a plugin is active, if not deactivate the actual plugin an show an error
 * @param  [string]  $my_plugin_name
 *                   The plugin name trying to activate. The name of this plugin
 *                   Ex:
@ericandrewlewis
ericandrewlewis / gist:95239573dc97c0e86714
Last active December 12, 2023 09:52
Setting up a WordPress site on AWS

Setting up a WordPress site on AWS

This tutorial walks through setting up AWS infrastructure for WordPress, starting at creating an AWS account. We'll manually provision a single EC2 instance (i.e an AWS virtual machine) to run WordPress using Nginx, PHP-FPM, and MySQL.

This tutorial assumes you're relatively comfortable on the command line and editing system configuration files. It is intended for folks who want a high-level of control and understanding of their infrastructure. It will take about half an hour if you don't Google away at some point.

If you experience any difficulties or have any feedback, leave a comment. 🐬

Coming soon: I'll write another tutorial on a high availability setup for WordPress on AWS, including load-balancing multiple application servers in an auto-scaling group and utilizing RDS.

@paul91
paul91 / pecl-memcached.sh
Created May 5, 2014 14:33
How to install php memcached on CentOS 6.5
#!/bin/bash
# How to install PHP memcached on CentOS 6.5
# Install dependencies
yum install cyrus-sasl-devel zlib-devel gcc-c++
# Get the latest libmemcached
wget https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar.gz
tar -xvf libmemcached-1.0.16.tar.gz
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@uggedal
uggedal / upgrade.sh
Created September 25, 2012 11:07
Upgrade postgresql from 9.1 to 9.2 on Arch Linux
systemctl stop postgresql && pacman -Syu --noconfirm && su - postgres -c 'mv /var/lib/postgres/data /var/lib/postgres/olddata' && su - postgres -c "initdb --locale en_US.UTF-8 -D '/var/lib/postgres/data'" && systemctl start postgresql.service && systemctl stop postgresql.service && pacman -S postgresql-old-upgrade --noconfirm && su - postgres -c 'pg_upgrade -d /var/lib/postgres/olddata/ -D /var/lib/postgres/data/ -b /opt/pgsql-9.1/bin/ -B /usr/bin/' && /var/lib/postgres/delete_old_cluster.sh && rm /var/lib/postgres/delete_old_cluster.sh && /var/lib/postgres/analyze_new_cluster.sh && systemctl start postgresql.service && pacman -Rs postgresql-old-upgrade --noconfirm