Skip to content

Instantly share code, notes, and snippets.

@mitrofun
mitrofun / README.md
Created December 19, 2019 19:39 — forked from aronwoost/README.md
Build auto-deploy with php and git(hub) on an EC2 Amazon AMI instance

Kind of continue from the other gist how to install LAMP on an Amazon AMI

##Install git

sudo yum install git-core

##Create ssh directory since it doesn't exists by default on the Amazon AMI

# coding: utf-8
from django.contrib import admin
from django.db import models
from tinymce.widgets import TinyMCE
from models import Message, FormSettings
class FormSettingsAdmin(admin.ModelAdmin):
formfield_overrides = {
@mitrofun
mitrofun / .babelrc
Created December 12, 2019 15:46 — forked from koddr/.babelrc
Webpack 3 config for simple Django/Flask project with Autoprefixer, PostCSS, SCSS style files, Vue.js and Babel
{
"presets": ["@babel/preset-env"]
}
@mitrofun
mitrofun / html
Created December 10, 2019 12:30 — forked from freelancedaddytv/html
Responsive Youtube with External Toggle Mute and UnMute Sound
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<style>
.videoWrapper {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 25px;
height: 0;
}
@mitrofun
mitrofun / README.md
Created September 16, 2019 19:36 — forked from joffilyfe/README.md
GITEA + Drone (0.7|0.8)

Compose file to setup and host a Gitea and Drone environment

This environment is dependent off a common network for docker/git plugin and gitea-server, so for this work fine in closed networks we have to create a custom network before run this composefile.

First create your network:

docker network create gitea-network
@mitrofun
mitrofun / admin.py
Created September 13, 2019 09:08 — forked from haxoza/admin.py
Django custom user model & custom admin
from django.contrib import admin
from django.contrib.auth import admin as auth_admin
from .models import *
from forms import UserChangeForm, UserCreationForm
class UserAdmin(auth_admin.UserAdmin):
fieldsets = (
(None, {'fields': ('email', 'password')}),
('Personal info', {'fields': ('first_name', 'last_name', 'twitter', 'photo', 'event')}),
@mitrofun
mitrofun / CHANGELOG.md
Created September 12, 2019 08:55 — forked from dispix/CHANGELOG.md
OAUTH2 Authentication and token management with redux-saga

Revision 5

  • Fix error parsing

Revision 4

  • Add missing yield in the login function

Revision 3

@mitrofun
mitrofun / mac-brew-python3-postgresql-psycopg2
Created July 17, 2019 22:13 — forked from iraquitan/mac-brew-python3-postgresql-psycopg2
PostgreSQL and psycopg2 initial setup on Mac with Homebrew and Python 3
# install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install postgresql
brew install postgresql
# start homebrew postgresql service
brew service start postgresql
# create a database with your username
@mitrofun
mitrofun / sanfrancisco-font.css
Created July 14, 2019 22:11
San Francisco Web Font
/** WARNING - USE AT OWN RISK */
/** IT IS AGAINST APPLE'S POLICY TO USE SF PRO FOR ANYTHING OTHER THAN iOS/tvOS/macOS/watchOS DESIGN & DEVELOPMENT */
/** https://sf.abarba.me/font.css */
/** https://sf.abarba.me/LICENSE.pdf */
/** 1. Copy/import this file into your main css/scss file */
/** 2. Change css font-family: to "SF Text", "SF Display" or "SF Mono" */
/** 3. Apply font-weight or italic to html elements */
/** THANK YOU */
@mitrofun
mitrofun / pgsql_backup.sh
Created June 18, 2019 17:26 — forked from sirbrillig/pgsql_backup.sh
Postgresql daily backup script.
#!/bin/bash
#
# Backup a Postgresql database into a daily file.
#
BACKUP_DIR=/pg_backup
DAYS_TO_KEEP=14
FILE_SUFFIX=_pg_backup.sql
DATABASE=
USER=postgres