Skip to content

Instantly share code, notes, and snippets.

@cloudjumper2000
cloudjumper2000 / models.py
Last active July 28, 2018 11:39
Sec6,vid93: Error: unresolved attribute reference 'title' for class 'Meta; line 20
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.urls import reverse
# Create your models here.
class Post(models.Model):
title = models.CharField(max_length=255)
slug = models.SlugField(max_length=255, unique=True)
@cloudjumper2000
cloudjumper2000 / gist:f24b0e7b65e5d752625aaa60c8a8f6ff
Created July 22, 2018 11:54
complete-sql-bootcamp-with-mysql-php-python : Error section 3, video 8
-- MySQL Workbench Forward Engineering
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,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema mydb
-- -----------------------------------------------------
#!/usr/bin/python -tt
from bs4 import BeautifulSoup
import urllib.request
import time
from time import sleep
from random import randint
#import urlparse
timestr = time.strftime("%m-%d-%Y_%H_%M_%S")
# inlinetime = time.strftime("%-m/%d/%Y")
@cloudjumper2000
cloudjumper2000 / nemin_sample.html
Last active March 19, 2018 15:02
Sample output for scrape
<ul class='products'>
<li class="widget">
<a class="product" href="/Item/39138113">
<div class="image">
<img class="lazy-load" src="http://example.com/39138113-thumb.jpg"
data-src="http://example.com/39138113-thumb.jpg" alt="" data-adaptive-background="1">
<ul class="badges">
</ul>
</div>
@cloudjumper2000
cloudjumper2000 / index.php
Created January 8, 2018 20:31
Working fine, reference to content working.
<?php get_header(); ?>
<div class="container">
<div class="row">
<div class="jumbotron">
@cloudjumper2000
cloudjumper2000 / single.php
Created January 8, 2018 20:26
Cant get the content to show.
<?php get_header(); ?>
<p>Single.php</p>
<div class="container">
<div class="row">
<div class="jumbotron">
<div class="container">
@cloudjumper2000
cloudjumper2000 / docker-compose.yml
Last active January 2, 2018 21:37
Base docker-compose.yml
services:
db:
image: mariadb
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: site1db
MYSQL_USER: wordpress