Skip to content

Instantly share code, notes, and snippets.

View dgleba's full-sized avatar
😁
.

dgleba dgleba

😁
.
View GitHub Profile
@dgleba
dgleba / app.DockerFile
Created June 22, 2018 03:29 — forked from satendra02/app.DockerFile
docker+rails+puma+nginx+postgres (Production ready)
FROM ruby:2.3.1
# Install dependencies
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
# Set an environment variable where the Rails app is installed to inside of Docker image:
ENV RAILS_ROOT /var/www/app_name
RUN mkdir -p $RAILS_ROOT
# Set working directory, where the commands will be ran:
@dgleba
dgleba / Dockerfile
Created June 9, 2018 03:37 — forked from jcavat/Dockerfile
docker-compose with php/mysql/phpmyadmin/apache
FROM php:7.1.2-apache
RUN docker-php-ext-install mysqli
@dgleba
dgleba / docker-compose.yml
Created June 9, 2018 03:32 — forked from wwwebman/docker-compose.yml
Docker Compose For Wordpress, Maria/MYSQL, phpMyAdmin
version: '2'
services:
db:
container_name: database
image: mariadb # Pull mysql image from Docker Hub
ports: # Set up ports exposed for other containers to connect to
- "3306:3306"
volumes:
- ./dep/mysql:/docker-entrypoint-initdb.d
@dgleba
dgleba / ldif-to-csv.sh
Created February 28, 2018 11:51 — forked from dansimau/ldif-to-csv.sh
Shell script that reads LDIF data from STDIN and outputs as CSV.
#!/bin/bash
#
# Converts LDIF data to CSV.
# Doesn't handle comments very well. Use -LLL with ldapsearch to remove them.
#
# 2010-03-07
# [email protected]
#
# Show usage if we don't have the right params
# Ways to execute a shell script in Ruby
# Example Script - Joseph Pecoraro
cmd = "echo 'hi'" # Sample string that can be used
# 1. Kernel#` - commonly called backticks - `cmd`
# This is like many other languages, including bash, PHP, and Perl
# Returns the result of the shell command
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111
@dgleba
dgleba / simple_args_parsing_sh.sh
Last active September 21, 2017 16:43 — forked from jehiah/simple_args_parsing.sh
a simple way to parse shell script arguments
#!/bin/sh
#
# a simple way to parse shell script arguments
#
# please edit and use to your hearts content
#
ENVIRONMENT="dev"
@dgleba
dgleba / gitcreate.sh
Last active June 20, 2017 01:04 — forked from jerrykrinock/gitcreate.sh
This script create a new repo on github.com, then pushes to it the local repo from the current directory.It is a fork of https://gist.github.com/robwierzbowski/5430952/. Some of Rob's lines just didn't work for me, and to fix them I needed to make it more verbose so that a mere electrical engineer could understand it.
#!/bin/bash
#
# try https://github.com/github/hub/releases
# https://stackoverflow.com/questions/35124997/creating-github-repository-from-command-line
#
# This script create a new repo on github.com, then pushes the local repo from the current directory to the new remote.
# It is a fork of https://gist.github.com/robwierzbowski/5430952/. Some of Rob's lines just didn't work for me, and to fix them I needed to make it more verbose so that a mere electrical engineer could understand it.
@dgleba
dgleba / Minimal eclipse install
Last active May 24, 2017 13:31 — forked from mjwall/Minimal eclipse install
Minimal eclipse install
Tired of extra plugins and cruft in eclipse, I tried the following
1. Download platform binary runtime from
http://archive.eclipse.org/eclipse/downloads/drops4/R-4.6.1-201609071200/
2. Modify eclipse.ini, set -vm JAVA_HOME/bin/java for java 8 and -Xmx2048m
3. Open and run check for updates
@dgleba
dgleba / perfectelementary.bash
Created December 16, 2016 23:50
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Install Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
CREATE SCHEMA IF NOT EXISTS `survey_001_models_from_tables` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ;
USE `survey_001_models_from_tables` ;
-- -----------------------------------------------------
-- Table `survey_001_models_from_tables`.`organizations`
-- -----------------------------------------------------