Skip to content

Instantly share code, notes, and snippets.

View avblink's full-sized avatar

Alexander Benjamin avblink

View GitHub Profile
`wp_enqueue_style('html5blank', get_template_directory_uri() . '/style.css?v=' . filemtime( get_stylesheet_directory() . '/style.css' ));`
ENV NVM_DIR="/usr/local/nvm"
ENV NVM_VERSION=v0.38.0
ENV NODE_VERSION 10.16.3
RUN mkdir -p $NVM_DIR
# Install nvm with node and npm
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/${NVM_VERSION}/install.sh | bash \
&& . $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION && npm i -g yarn \
@avblink
avblink / xdebug.md
Last active February 18, 2021 19:34

xDebug, WSL2, Docker

Some useful commands to get xdebug running with docker on wsl2

xdebig.ini configuration:

zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so
xdebug.idekey = VSCODE
@avblink
avblink / wp.sh
Created January 8, 2020 15:39 — forked from FeChagas/wp.sh
#!/bin/bash -e
clear
echo "============================================"
echo "Instalador de Wordpress"
echo "============================================"
echo "Host do Banco de dados: "
read -e dbhost
echo "Nome do Banco de dados: "
read -e dbname
echo "Usúario do Banco de dados: "
@avblink
avblink / sass-mixins.md
Last active January 17, 2019 11:26
Sass Mixins

Linear left to right gradient compatible with iOS safari

@mixin linear-gradient-ltr($fromColor, $fromStop, $toColor, $toStop) {
  background: $toColor;
  background: -moz-linear-gradient(to right, $fromColor $fromStop, $toColor $toStop);
  background: -webkit-gradient(linear, left, right, color-stop($fromStop,$fromColor), color-stop($toStop,$toColor));
  background: -webkit-linear-gradient(left, $fromColor $fromStop, $toColor $toStop); //iOS
  background: linear-gradient(to right, $fromColor $fromStop, $toColor $toStop);  //iOS
  background: -o-linear-gradient(left, $fromColor $fromStop, $toColor $toStop);
  filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#{$fromColor}, endColorstr=#{$toColor});
@avblink
avblink / laravel.md
Last active February 2, 2019 22:09
Laravel related

Laravel 5 file permissions:

The storage directory

Group Writable (Group, User Writable)

$ sudo chmod -R gu+w storage

World-writable (Group, User, Other Writable)

$ sudo chmod -R guo+w storage

The bootstrap/cache directory

Group Writable (Group, User Writable)
@avblink
avblink / App.js
Created November 30, 2017 20:43
React Native nested navigation example. Fixed header navigation with nested tab navigation.
import React, { Component } from 'react';
import {
View,
} from 'react-native';
import MyStacksOverTabs from '../config/routes';
export default class NavigationScreen extends Component {
render() {
return (
@avblink
avblink / Drupal8Random.md
Last active December 21, 2020 17:33
Drupal8:Random

Install specific Drupal version with composer

composer create-project drupal-composer/drupal-project:8.x-dev some-dir --stability dev --no-interaction --no-install
cd some-dir
composer require --no-update drupal/core:^8.5
composer require --no-update --dev webflo/drupal-core-require-dev:^8.5
composer install [--no-dev]

Get current URI

@avblink
avblink / vue2-nuxt.md
Last active July 11, 2017 08:08
Vue and Nuxt related snippets

Add sass loader

npm install node-sass sass-loader --save-dev

NUXT simultaneous asynchronous data request

async asyncData({ params }) {
  let [users, posts] = await Promise.all([
 axios.get('http://jsonplaceholder.typicode.com/users'),