Skip to content

Instantly share code, notes, and snippets.

View Jekis's full-sized avatar

Eugene Eroshkin Jekis

  • Russia, Novosibirsk
View GitHub Profile
@Jekis
Jekis / cleanup-docker.sh
Last active August 23, 2022 02:15 — forked from mlebkowski/cleanup-docker.sh
Cleanup docker disk space
#!/bin/bash
# remove exited containers:
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v
# remove unused images:
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi
# remove unused volumes:
docker volume ls -f dangling=true | awk '{ print $2 }' | xargs docker volume rm
@Jekis
Jekis / update-phpstorm.sh
Last active July 24, 2022 06:49 — forked from olivertappin/update-phpstorm.sh
Download and install the latest version of PhpStorm for Ubuntu. Create .desktop file and use custom vmoptions.
#!/bin/bash
#
# Based on https://gist.github.com/olivertappin/e5920e131db9a451c91aa6e2bc24dc40
#
INSTALL_DIR=/opt/phpstorm
if [ "$(whoami)" != "root" ]
then
@Jekis
Jekis / parameters.rake
Created January 18, 2016 09:52 — forked from carlcraig/parameters.rake
Capistrano Symfony Parameters
namespace :symfony do
namespace :parameters do
desc "Create parameters.yml file based on the parameters.yml.dist one. Ask for all parameters."
task :create do
on roles(:all) do
if not test("[ -f #{shared_path}/app/config/parameters.yml ]")
distParameters = YAML::load(capture("cat #{release_path}/app/config/parameters.yml.dist"))
parameters = { "parameters" => {} }
distParameters['parameters'].each do |k,v|