Skip to content

Instantly share code, notes, and snippets.

View ondoheer's full-sized avatar

Pedro Baumann ondoheer

  • Athelas Perú
  • Lima - Perú
View GitHub Profile
@cweilguny
cweilguny / docker-compose-gitlab.yml
Last active October 27, 2021 00:55
A docker-compose config in v3 format for nginx-proxy with separate containers for nginx, dockergen and letsencrypt-companion. Additional example on how to get GitLab docker container running with this nginx-proxy setup. You need to create the docker network before, just run 'docker network create nginx-proxy'. Docker will tell you so if you don'…
version: '3'
services:
web:
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'gitlab.example.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.example.com'
nginx['listen_port'] = 80
@adeekshith
adeekshith / .git-commit-template.txt
Last active February 21, 2024 12:06 — forked from Linell/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@riteshreddyr
riteshreddyr / flask-admin many-to-many search.md
Last active July 19, 2021 07:21
Flask-admin Many-to-Many Search and Filtering

#Flask-admin Many-to-Many Search

Many-to-Many searches are not easily supported by Flask-admin. Read Here for more info

##Solution

  • Add the association tables to the list of join tables so that the join between the two tables can be made through the association table.
  • Reverse the tables to ensure that the association tables are processed before the other join table.

Tested on Flask-Admin 1.1.0

@iangcarroll
iangcarroll / Security.php
Last active April 19, 2021 23:32
Expose (a PHPIDS fork) middleware for Laravel. Assumes it's already included via composer.
<?php namespace App\Http\Middleware;
use Closure;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Log;
class Security {
/**
<?php
/**
* Plugin Name: Remove login autocomplete
* Description: Disable login password autocomplete
* Version: 0.1
* Author: Nobody
* License: WTFPL
*/
add_action('login_init', 'acme_autocomplete_login_init');
@Donclurd
Donclurd / AuthManager.php
Created February 24, 2015 12:58
Backend Authentication
<?php namespace App\Domain\Backend\Auth;
use Illuminate\Auth\EloquentUserProvider;
class AuthManager extends \Illuminate\Auth\AuthManager
{
protected function createEloquentProvider()
{
$model = 'App\Models\BackendUser';
@theRemix
theRemix / README.md
Last active February 28, 2023 14:37
The Holy Grail - Gulp + Sass + LiveReload + Foundation

Gulp + Sass + LiveReload + Foundation

Goals

To have a gulp workflow that with a single process,

  1. watches for any sass changes, then compiles sass source into css
  2. watches for any changes in the public directory, triggers live-reload
  3. serves your static content in public/
@doobeh
doobeh / example.html
Last active June 8, 2023 18:09
Checkbox WTForms Example (in Flask)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<form method="post">
{{ form.hidden_tag() }}
{{ form.example }}

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@thoas
thoas / puller.py
Created January 10, 2012 15:04
Migration script from MySQL to PostgreSQL via SQLAlchemy
#!/usr/bin/env python
import getopt
import sys
from sqlalchemy import create_engine, MetaData, Table
from sqlalchemy.dialects.mysql.base import TINYINT
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.exc import ProgrammingError