I hereby claim:
- I am martinsotirov on github.
- I am martinsotirov (https://keybase.io/martinsotirov) on keybase.
- I have a public key ASDKnS8MMqzWl9D55dCVsTPZ0kZVgwYpWIsn1-oY7Y5tZAo
To claim this, I am signing this object:
| // batch-change file extension of multiple files | |
| // change mv to git mv to retain git history | |
| find . -name "*.css" -exec bash -c 'mv "$1" "${1%.css}".scss' - '{}' \; | |
| // get summed file size of all files from type | |
| find . -name "*.css" | xargs du -sch |
| /** | |
| * Kudos to https://timdeschryver.dev/blog/making-your-application-feel-faster-by-prefetching-data-with-ngrx | |
| */ | |
| @Directive({ | |
| selector: '[prefetch]', | |
| }) | |
| export class PrefetchDirective implements OnInit, AfterViewInit, OnDestroy { | |
| @Input() | |
| prefetchMode: ('load' | 'hover' | 'visible')[] = ['visible'] |
I hereby claim:
To claim this, I am signing this object:
| /** | |
| * Handle WPML REST requests | |
| */ | |
| add_action('rest_api_init', function() { | |
| if (isset($_REQUEST['lang']) && !empty($_REQUEST['lang'])) { | |
| global $sitepress; | |
| $availableLangs = array_keys(apply_filters('wpml_active_languages', [])); | |
| $currentLang = get_query_var('lang'); | |
| $newLang = sanitize_text_field($_REQUEST['lang']); |
| #!/bin/bash | |
| echo "Installing prerequisites" | |
| apt-get install libssh2-1 libssh2-1-dev -y &>/dev/null | |
| echo "Downloading pecl-networking-ssh2" | |
| wget https://github.com/php/pecl-networking-ssh2/archive/master.zip &>/dev/null | |
| echo "Installing pecl-networking-ssh2" | |
| unzip master.zip &>/dev/null |
| fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=WORDPRESS:50m inactive=60m; | |
| fastcgi_cache_key "$scheme$request_method$host$request_uri"; | |
| fastcgi_cache_use_stale error timeout invalid_header http_500; | |
| server { | |
| location / { | |
| try_files $uri $uri/ /index.php?$args; | |
| } |
| apt-get install git nginx-extras python-software-properties build-essential php5-common php5-dev php5-cli php5-fpm curl php5-curl php5-gd php5-mcrypt php5-mysql -y |