Skip to content

Instantly share code, notes, and snippets.

View developer88's full-sized avatar

Andrey Eremin developer88

View GitHub Profile
@developer88
developer88 / docker-vz.yaml
Last active December 14, 2023 11:21
Lima config
# Example to use Docker instead of containerd & nerdctl
# $ limactl start ./docker.yaml
# $ limactl shell docker docker run -it -v $HOME:$HOME --rm alpine
# To run `docker` on the host (assumes docker-cli is installed):
# $ export DOCKER_HOST=$(limactl list docker --format 'unix://{{.Dir}}/sock/docker.sock')
# $ docker ...
# Example to run ubuntu using vmType: vz instead of qemu (Default)
# This example requires Lima v0.14.0 or later and macOS 13.
@developer88
developer88 / Dockerfile
Created July 29, 2022 08:26
Ruby docker env
# More docs on Dockerfile syntax => https://docs.docker.com/engine/reference/builder/
# Set proper ruby version from the right image https://hub.docker.com/_/ruby?tab=tags
FROM ruby
WORKDIR /home/app
ENV PORT 3000
EXPOSE $PORT
@developer88
developer88 / gist:440df356c09a6e3eeca3c2404ae1c77d
Last active January 17, 2017 12:49 — forked from andrzejsliwa/gist:778535
list all available cucumber steps - (rake cucumber:steps)
# based on http://www.natontesting.com/2010/01/11/updated-script-to-list-all-cucumber-step-definitions/
#
desc 'List all defined steps'
task :steps do
require 'hirb'
extend Hirb::Console
puts "CUCUMBER steps:"
puts ""
step_definition_dir = "features/step_definitions"
@developer88
developer88 / e-CloseByProfit.mq4
Last active July 11, 2016 17:03
e-CloseByProfit.mq4 robot that closes your order when you need to / робот, который закрывает сделки тогда, когда вам это надо
//+----------------------------------------------------------------------------+
//| e-CloseByProfit.mq4 |
//| Ким Игорь В. aka KimIV |
//| http://www.kimiv.ru |
//| |
//| С доработками от: |
//| Андрей Ерёмин |
//| http://aeremin.ru |
//| |
//| |
@developer88
developer88 / related_posts_drento.css
Last active October 8, 2016 16:25
Contextual Related Posts [WP] style for onceingermany.ru and code.aeremin.ru
@developer88
developer88 / deploy.rb
Last active June 21, 2018 13:05
Deploy phpBB with Mina
require 'mina/bundler'
require 'mina/git'
set :application, "forum"
set :domain, '%SERVERNAME%'
set :deploy_to, "%PATH-TO-APPLICATION%"
set :repository, '%REPOSITORY-URL%.git'
set :branch, 'master'
set :login, "%LOGIN%"
@developer88
developer88 / .profile
Last active March 2, 2017 14:24
Some PostgreSQL snippets
alias 'pg_sql_restore'='PGPASSWORD=SOMEPASSWORD psql -cO -U username -d dbname -h localhost -f ' # + set path to backup file
alias 'pg_tar_restore'='PGPASSWORD=SOMEPASSWORD pg_restore -cO -U username -d dbname -h localhost ' # + set path to backup file
@developer88
developer88 / index.html.slim
Last active August 29, 2015 13:56 — forked from axelav/scrollspy.coffee
SpyOn Directive for AngularJS >= 1.2
#root { scroll-spy data-top-buffer="200" }
div spy="profile_info_part"
| Spy on profile info part and add 'active'class to this div
div
a name="profile_info_part" id="profile_info_part"
@developer88
developer88 / csv_export.rb
Last active January 1, 2016 08:59
Export data to Excel in csv format
# For windows only.
#
csv_string = CSV.generate(col_sep: ";", encoding: 'Windows-1251') do |csv|
csv << "Add some data"
end
send_data(csv_string.encode('Windows-1251'), type: 'text/csv; charset=windows-1251; header=present', disposition: "attachment", filename: "file_to_export.csv")
@developer88
developer88 / .bash_profile
Last active December 18, 2015 15:19
.bash_profile for Mac OS X
# Hack for using proxy on MacOS X
export http_proxy="http://LOGIN:PASSWORD@ADDRESS:PORT"
export ftp_proxy="http://LOGIN:PASSWORD@ADDRESS:PORT"
export FTP_PROXY="http://LOGIN:PASSWORD@ADDRESS:PORT"
export HTTP_PROXY="http://LOGIN:PASSWORD@ADDRESS:PORT"
export ALL_PROXY="http://LOGIN:PASSWORD@ADDRESS:PORT"
# Aliases
alias curl="curl -x LOGIN:PASSWORD@ADDRESS:PORT"
alias svn=colorsvn