Skip to content

Instantly share code, notes, and snippets.

Roman Tataurov webhive

Block or report user

Report or block webhive

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@webhive
webhive / rspec_rails_cheetsheet.rb
Created Aug 8, 2018 — forked from mlr/rspec_rails_cheetsheet.rb
Rspec Rails cheatsheet with expect syntax (including capybara matchers)
View rspec_rails_cheetsheet.rb
# Model
expect(@user).to have(1).error_on(:username) # checks whether there is an error in username
expect(@user.errors[:username]).to include("can't be blank") # check for the error message
# Rendering
expect(response).to render_template(:index)
# Redirecting
@webhive
webhive / custom_board.h
Last active Jun 9, 2019
BLE400 custom board file
View custom_board.h
#ifndef BLE400_H
#define BLE400_H
// LEDs definitions for BLE400
#define LEDS_NUMBER 5
#define LED_START 18
#define LED_1 18
#define LED_2 19
#define LED_3 20
View Move-Slic3r-data-to-usr-share-slic3r.patch
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 43d7dee7..7939a767 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,13 +45,13 @@ find_package(Perl REQUIRED)
add_subdirectory(xs)
enable_testing ()
-get_filename_component(PERL_BIN_PATH "${PERL_EXECUTABLE}" DIRECTORY)
-add_test (NAME xs COMMAND "${PERL_EXECUTABLE}" ${PERL_BIN_PATH}/prove -I ${PROJECT_SOURCE_DIR}/local-lib/lib/perl5 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/xs)
@webhive
webhive / Makefile
Created Dec 24, 2017
STM8 Standard library patching
View Makefile
CC = sdcc
AR = sdar
CHIP = STM8S003
BUILD_DIR = ./build
SRC_DIR = ./STM8S_StdPeriph_Lib/Libraries/STM8S_StdPeriph_Driver/src
INC_DIR = ./STM8S_StdPeriph_Lib/Libraries/STM8S_StdPeriph_Driver/inc
DIST_DIR = ./$(CHIP)_stdlib
View webhive.zsh-theme
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
PROMPT='${ret_status} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}\ue0a0 [%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}] %{$fg[red]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}]"
# Comment
# PROMPT='%{$fg[magenta]%}[%c] %{$reset_color%}'
View elasticsearch.sh
#!/bin/bash
# Install a custom ElasticSearch version - https://www.elastic.co/products/elasticsearch
#
# To run this script in Codeship, add the following
# command to your project's test setup command:
# \curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/packages/elasticsearch.sh | bash -s
#
# Add at least the following environment variables to your project configuration
# (otherwise the defaults below will be used).
# * ELASTICSEARCH_VERSION
@webhive
webhive / Readme.md
Last active Jan 2, 2016
Wintersmith benchmark
View Readme.md

Measurement

There was a script written for benchmark wintersmith-test.sh.

Result file has columns:

  • Number of posts
  • Generattion time in seconds

Directory structure

@webhive
webhive / Readme.md
Last active Apr 11, 2017
Perfomance benchmark of DocPad site generation
View Readme.md

Measurement described

  1. docpad run
  2. Selected 'Twitter Bootstrap with Coffeekup' skeleton
  3. Remove docpad-plugin-cleanurl
  4. docpad --env static generate
  5. Recored the time line
  6. Add 100 files to the src/documents/posts directory
  7. Goto #4
You can’t perform that action at this time.