Skip to content

Instantly share code, notes, and snippets.

View holywarez's full-sized avatar
👨‍💻

Anatoly Lapshin holywarez

👨‍💻
View GitHub Profile
@holywarez
holywarez / cheatsheet.txt
Created October 24, 2023 21:15 — forked from DNA/cheatsheet.txt
Terminal colors cheat sheet
"WTF IS \033[30;47m???", a practical cheat-sheet
Font color definitions can be intimidating and nonsense at first,
but it is quite easy, lets just follow character by character:
┌────────┤\033├── Escape character (ESC)
│┌───────┤ [ ├── Define a sequence (many characters in a code)
││
││┌──────┤ X ├── Parameter (optional) ┐
│││┌─────┤ ; ├── Parameter separator │ SGR Code
@holywarez
holywarez / ansible_ror.md
Created February 8, 2020 19:56 — forked from finist/ansible_ror.md
Setup Ruby on Rails application to remote server with Ansible

Установка Ruby on Rails приложения на удаленный сервер с помощью Ansible

Установка Ansible на Ubuntu 16.04

подключаемся к серверу и ставим Ansible

sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install ansible
@holywarez
holywarez / gist:0e4928c16f6760c0b9dd779468ffb36e
Created February 8, 2020 15:03 — forked from finist/gist:7433753
Cities of Russia with regions in yaml format
---
- Адыгея:
- Абадзехская
- Адамий
- Адыгейск
- Новая Адыгея
- Нижний Айрюм
- Апостолиди
- Ассоколай
- Кармир-Астх
@holywarez
holywarez / upgrade-postgres-9.3-to-9.5.md
Created April 4, 2016 19:24 — forked from johanndt/upgrade-postgres-9.3-to-9.5.md
Upgrading PostgreSQL from 9.3 to 9.5 on Ubuntu

TL;DR

Install Postgres 9.5, and then:

sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main

This gist is the source code for http://gary.beagledreams.com/page/go-websocket-chat.html

Copyright (c) 2013 Gary Burd

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

%html
%style
.breadcrumbs {
background-color: #f5f5f5;
text-align: justify;
line-height: 0;
text-align-last: justify;
padding: 8px 15px;
&:after {
@holywarez
holywarez / capybara cheat sheet
Created February 22, 2012 09:00 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@holywarez
holywarez / about.md
Created August 31, 2011 06:15 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
# Конфигуратор lib/flexible_discounts/configuration.rb
require 'singleton'
class FlexibleDiscounts::Configuration
class Filter
class IncompleteArgumentList; end
class Requirements
конфиг
config/flexible_discounts.rb
FlexibleDiscounts::Configuration.run do |config|
config.filter :isbns, :scope => :item do
requires do
value :as => :array, :type => :isbn
end
logic do |item|