This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Parse a string, and convert it into a series of sequential numbers. | |
* It works similar to Acrobat's print specified pages input box. | |
* | |
* Examples: | |
* | |
* input: "1, 2, 3, 4, 5, 6" --> output: 1, 2, 3, 4, 5, 6 | |
* input: "1-6" --> output: 1, 2, 3, 4, 5, 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :stages, %w(production staging) | |
set :default_stage, "staging" | |
require 'capistrano/ext/multistage' | |
# -------------------------------------------- | |
# Repository | |
# -------------------------------------------- | |
set :scm, :git # I am using git, so I specify it here | |
set :repository, "<repo>" # This is the path to the repository on the server, we pushed the code here earlier. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "keys": ["super+x"], "command": "clipboard_history_cut" }, | |
{ "keys": ["super+c"], "command": "clipboard_history_copy" }, | |
{ "keys": ["super+v"], "command": "clipboard_history_paste" }, | |
{ "keys": ["super+shift+v"], "command": "clipboard_history_previous_and_paste" }, | |
{ "keys": ["super+pagedown"], "command": "clipboard_history_next" }, | |
{ "keys": ["super+pageup"], "command": "clipboard_history_previous" }, | |
{ "keys": ["super+alt+ctrl+v"], "command": "clipboard_history_choose_and_paste" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --------------------------------------------------------- | |
# font and size | |
# --------------------------------------------------------- | |
fontName = "Menlo" | |
fontSize = 14 | |
# --------------------------------------------------------- | |
# Display the name of the home directory | |
# --------------------------------------------------------- | |
windowTitleProject = '${projectDirectory:+ — ${projectDirectory/^.*\///}}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Based on Batch Convert Script originally by Beterhans | |
# Put all video files need to be converted in a folder! | |
# the name of files must not have " " Space! | |
# Rename the File if contain space | |
# Target dir | |
indir=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this to your the Magento .htaccess file located in your docroot | |
############################################ | |
## Nginx proxy HTTPS Fix for Magento | |
## Source: https://www.sonassi.com/blog/magento-kb/magento-https-redirect-loop-2 | |
SetEnvIf X-Forwarded-Proto https HTTPS=on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -558,13 +567,13 @@ | |
.core (@gridColumnWidth, @gridGutterWidth) { | |
.spanX (@index) when (@index > 0) { | |
- (~".span@{index}") { .span(@index); } | |
+ .span@{index} { .span(@index); } | |
.spanX(@index - 1); | |
} | |
.spanX (0) {} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Set colorscheme to solarized | |
colorscheme solarized | |
" Change the Solarized background to dark or light depending upon the time of | |
" day (5 refers to 5AM and 17 to 5PM). Change the background only if it is not | |
" already set to the value we want. | |
function! SetSolarizedBackground() | |
if strftime("%H") >= 5 && strftime("%H") < 17 | |
if &background != 'light' | |
set background=light |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
img { | |
max-width: 100%; | |
} | |
</style> | |
<h1>Creating a srcset loop based on Resources</h1> | |
<!-- | |
NOTE: This requires Hugo 0.32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types = 1); | |
namespace Training5\VendorRepository\Controller\Test; | |
use Magento\Catalog\Api\Data\ProductInterface; | |
use Magento\Catalog\Api\ProductRepositoryInterface; | |
use Magento\Framework\Api\Filter; | |
use Magento\Framework\Api\FilterBuilder; |
OlderNewer