Skip to content

Instantly share code, notes, and snippets.

@elena-kolevska
elena-kolevska / memtier_start.sh
Last active Dec 23, 2019
Small cli tool for setting up parameters of the memtier_benchmark tool
View memtier_start.sh
#!/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
@elena-kolevska
elena-kolevska / .zshrc
Last active Aug 8, 2019
My powerlevel9k theme config
View .zshrc
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir dir_writable vcs)
POWERLEVEL9K_DIR_WRITABLE_FORBIDDEN_FOREGROUND="white"
POWERLEVEL9K_DIR_WRITABLE_FORBIDDEN_BACKGROUND="197"
POWERLEVEL9K_HOME_SUB_ICON="$(print_icon "HOME_ICON")"
POWERLEVEL9K_DIR_PATH_SEPARATOR=" $(print_icon "LEFT_SUBSEGMENT_SEPARATOR") "
POWERLEVEL9K_DIR_ETC_BACKGROUND='141'
POWERLEVEL9K_DIR_ETC_FOREGROUND='235'
POWERLEVEL9K_DIR_HOME_BACKGROUND='141'
@elena-kolevska
elena-kolevska / .bashrc
Last active Oct 16, 2018
Coloured prompt
View .bashrc
#...
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/
@elena-kolevska
elena-kolevska / 20-xdebug.ini
Created Dec 17, 2015
Xdebug configuration. Homestead/Ubuntu.
View 20-xdebug.ini
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
View Array reduce
$filters = array_reduce($filters_array, function ($result, $item) {
$result[$filters_array['id']] = $filters_array;
return $result;
}, array());
View Default (Linux).sublime-keymap
[{
"keys": [
"ctrl+shift+z"
],
"command": "expand_as_you_type",
"context": [
{
"operand": false,
"operator": "equal",
"match_all": true,
@elena-kolevska
elena-kolevska / validators.php
Last active Oct 18, 2020
Custom alphabetic validator that allows spaces
View validators.php
<?php
/* app/validators.php */
Validator::extend('alpha_spaces', function($attribute, $value)
{
return preg_match('/^[\pL\s]+$/u', $value);
});
/*
View Form::delete macro
/*
|--------------------------------------------------------------------------
| 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.
|
*/
View .zshrc
# 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
@elena-kolevska
elena-kolevska / all.yawl.settings
Created Dec 5, 2013
Yawl gnome extension settings
View all.yawl.settings
[addons>attention]
icons-attention-blink b +
icons-attention-blink-rate s 39
[addons>preview]
windows-preview b -
windows-preview-dim-color s #01234c
windows-preview-dim-opacity s 25
windows-preview-panel-opacity s 25