Skip to content

Instantly share code, notes, and snippets.

View VolCh's full-sized avatar
🏠
Working from home

Vladimir Chernyshev VolCh

🏠
Working from home
View GitHub Profile
@judy2k
judy2k / parse_dotenv.bash
Created March 22, 2017 13:34
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
@bittner
bittner / 60-jetbrains.conf
Created September 25, 2015 07:57
Inotify configuration for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm). Create this file with e.g. `sudo vim /etc/sysctl.d/60-jetbrains.conf`
# Set inotify watch limit high enough for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm).
# Create this file as /etc/sysctl.d/60-jetbrains.conf (Debian, Ubuntu), and
# run `sudo service procps start` or reboot.
# Source: https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit
#
# More information resources:
# -$ man inotify # manpage
# -$ man sysctl.conf # manpage
# -$ cat /proc/sys/fs/inotify/max_user_watches # print current value in use
@satooshi
satooshi / DirectoryStructure
Last active September 26, 2021 20:03
Directory structure of Domain Driven Design application with Symfony2, Doctrine2.
sf2-ddd
├── app
├── bin
├── build
├── lib
├── src
│   └── __VendorPrefix
│   ├── Application
│   │   └── __DomainNameBundle
│   │   ├── Command
@benton
benton / ssh-docker-compose.md
Created June 25, 2016 17:18
Ephemeral/secure SSH key usage with docker-compose?

Hello, Ben.

It was good to meet you in the Ask The Experts Booth at this year's DockerCon. Thank you for answering my questions about LDAP integration with the DataCenter's role-based access control, and for patiently attempting to explain to me how we at Medidata, the "docker-compose uninitiated", might overcome our need to bundle Ruby gems from non-public Git repositories, using only docker-compose. I'm still unclear on the specifics of the technique you laid out, so thanks even more for offering to provide an example!

Fortunately, our problem is very simply expressed as a single line added to the excellent [Rails example][1] that you guys already posted for Docker compose. Only the build phase is relevant here, so our problem can be quickly reproduced by following those instructions faithfully, until the part where it says to add the rubyracer gem to the Gemfile.

At that point, if we also add a gem whose source is a non-public git repo, of the form:

gem 'mygem', :git => 'git@github.com:user/myg