Skip to content

Instantly share code, notes, and snippets.

View dgleba's full-sized avatar
😁
.

dgleba dgleba

😁
.
View GitHub Profile
// ==UserScript==
// @name Google Bookmarks fix
// @match https://www.google.com/bookmarks/*
// @grant none
// @require https://code.jquery.com/jquery-1.12.4.min.js
// @require https://code.jquery.com/ui/1.12.1/jquery-ui.js
// ==/UserScript==
$(function() {
try {
// ==UserScript==
// @name Google Bookmarks fix
// @match https://www.google.com/bookmarks/*
// @grant none
// @require https://code.jquery.com/jquery-1.12.4.min.js
// @require https://code.jquery.com/ui/1.12.1/jquery-ui.js
// ==/UserScript==
$(function() {
try {
@dgleba
dgleba / .dockerignore
Created June 22, 2018 11:16 — forked from davidderus/.dockerignore
Docker + Rails + Puma + Postgres + Nginx
.git
.gitignore
/doc
.yardoc
coverage
jsdoc
/tmp
/log
Dockerfile
Dockerfile.prod
@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 / gist:4f5031dbd760e971844f277701f09338
Created April 29, 2018 18:51
Enable sqlite3 in Adminer
## Ensure System field is showing on the login form
Comment out `AdminerLoginServers` if it is present in the index.php
```
// new AdminerLoginServers([
// filter_input(INPUT_SERVER, 'HTTP_HOST') => filter_input(INPUT_SERVER, 'SERVER_NAME')
// ]),
```
## Create / edit index.php to enable plugins and enable the sqlite login plugin
@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"