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
// Run this gist with Redis Stack 6.2 | |
// Tested with: | |
// docker run -p 6381:6379 redis/redis-stack-server:6.2.6-v9-arm64 | |
package main | |
import ( | |
"bytes" | |
"context" | |
"encoding/binary" |
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
#!/usr/bin/env bash | |
# Colours definition | |
HIGHLIGHT1='\033[0;34m' | |
HIGHLIGHT2='\033[0;33m' | |
SUCCESS='\033[0;32m' | |
ERROR='\033[0;31m' | |
GRAY='\033[0;37m' | |
NC='\033[0m' # No Color |
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
# elena.zsh-theme | |
# | |
# Author: Elena Kolevska | |
# Based on Andy Flemin's afmagic theme | |
# dashed separator size | |
function afmagic_dashes { | |
# check either virtualenv or condaenv variables | |
local python_env_dir="${VIRTUAL_ENV:-$CONDA_DEFAULT_ENV}" | |
local python_env="${python_env_dir##*/}" |
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
#... | |
PS1="\[\e[32m\]\u\[\e[m\]\[\e[32m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\] \[\e[33m\]\w\[\e[m\] \[\e[33m\]\\$\[\e[m\] " | |
#... | |
# Online prompt generator: http://ezprompt.net/ |
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
zend_extension=xdebug.so | |
xdebug.remote_enable = 1 | |
xdebug.remote_connect_back = 1 | |
xdebug.remote_port = 9000 | |
xdebug.var_display_max_depth = -1 | |
xdebug.var_display_max_children = -1 | |
xdebug.var_display_max_data = -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
$filters = array_reduce($filters_array, function ($result, $item) { | |
$result[$filters_array['id']] = $filters_array; | |
return $result; | |
}, array()); |
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
Show hidden characters
[{ | |
"keys": [ | |
"ctrl+shift+z" | |
], | |
"command": "expand_as_you_type", | |
"context": [ | |
{ | |
"operand": false, | |
"operator": "equal", | |
"match_all": true, |
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 | |
/* app/validators.php */ | |
Validator::extend('alpha_spaces', function($attribute, $value) | |
{ | |
return preg_match('/^[\pL\s]+$/u', $value); | |
}); | |
/* |
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
/* | |
|-------------------------------------------------------------------------- | |
| Delete form macro | |
|-------------------------------------------------------------------------- | |
| | |
| This macro creates a form with only a submit button. | |
| We'll use it to generate forms that will post to a certain url with the DELETE method, | |
| following REST principles. | |
| | |
*/ |
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
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="agnoster" | |
# Example aliases |
NewerOlder