Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View FullStackAlex's full-sized avatar

Full-Stack Alex FullStackAlex

  • Full-Stack Alex
  • Berlin
View GitHub Profile
@FullStackAlex
FullStackAlex / php-fpm-global.conf.ini
Last active October 9, 2021 17:45
PHP-FPM global config ini file from php-src repo (as of spring 2021). https://github.com/php/php-src/tree/master/sapi/fpm
;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;
; All relative paths in this configuration file are relative to PHP's install
; prefix (@prefix@). This prefix can be dynamically changed by using the
; '-p' argument from the command line.
;;;;;;;;;;;;;;;;;;
; Global Options ;
@FullStackAlex
FullStackAlex / ANSI.md
Last active September 25, 2020 18:09 — forked from fnky/ANSI.md
ANSI Escape Codes

Escape code / character

An Escape code is a command for a string interpretting programm to treat following characters as a command (but not as simple text, as by default).

There are different notations for an ASCII escape code:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1b
  • Decimal: 27
@FullStackAlex
FullStackAlex / tmux.conf
Created May 31, 2020 22:00 — forked from markandrewj/tmux.conf
Basic Tmux Status Bar
# ----------------------
# Status Bar
# -----------------------
set-option -g status on # turn the status bar on
set -g status-utf8 on # set utf-8 for the status bar
set -g status-interval 5 # set update frequencey (default 15 seconds)
set -g status-justify centre # center window list for clarity
# set-option -g status-position top # position the status bar at top of screen
# visual notification of activity in other windows
@FullStackAlex
FullStackAlex / tmux_without_sudo.sh
Last active May 10, 2020 17:03 — forked from ryin/tmux_local_install.sh
bash script for installing tmux without root access
#!/bin/bash
# Script for installing tmux on a Mac without sudo
# tmux will be installed in $NOSUDO.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=3.1b
@FullStackAlex
FullStackAlex / vpn.md
Created December 27, 2019 20:30 — forked from joepie91/vpn.md
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

A Russian translation of this article can be found here, contributed by Timur Demin. There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.

Why not?

@FullStackAlex
FullStackAlex / wp-query-ref.php
Created November 4, 2019 02:58 — forked from luetkemj/wp-query-ref.php
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@FullStackAlex
FullStackAlex / consoleColors.js
Created October 1, 2019 00:26 — forked from abritinthebay/consoleColors.js
The various escape codes you can use to color output to StdOut from Node JS
// Colors reference
// You can use the following as so:
// console.log(colorCode, data);
// console.log(`${colorCode}some colorful text string${resetCode} rest of string in normal color`);
//
// ... and so on.
export const reset = "\x1b[0m"
export const bright = "\x1b[1m"
export const dim = "\x1b[2m"
@FullStackAlex
FullStackAlex / class-method-callback-wordpress-action-hook.php
Last active September 12, 2019 12:34
Use class method in WordPress action hook
require_once( get_template_directory() . "/path/to/OtherClass.php" );
use Namespace\OfThe\OtherClass;
(...)
'callback' => 'OtherClass::SomeStaticMethod'
curl -O https://wordpress.org/latest.zip
@FullStackAlex
FullStackAlex / acf-get-field-key.php
Created November 1, 2018 09:31 — forked from mcguffin/acf-get-field-key.php
WordPress Advanced Custom Fields get field key from field name
<?php
/**
* Get field key for field name.
* Will return first matched acf field key for a give field name.
*
* ACF somehow requires a field key, where a sane developer would prefer a human readable field name.
* http://www.advancedcustomfields.com/resources/update_field/#field_key-vs%20field_name
*
* This function will return the field_key of a certain field.