brew update
brew install pyenv
sqlite3 databse.db .dump > sqlite3_database_dump.sql
python sqlite3_to_mysql.py database.sql > mysql_database_dump.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Install django-storages app with pip | |
# $ pip install django-storages | |
# | |
INSTALLED_APPS = ( | |
... | |
'storages', | |
... | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css"> | |
<link href="https://fonts.googleapis.com/css?family=Raleway:100,200,300" rel="stylesheet"> | |
<style> | |
body { | |
background-image: url("http://static.simpledesktops.com/uploads/desktops/2014/10/15/tetons-at-night.png"); | |
background-size: cover; | |
color: rgba(255,255,255,.5); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################ | |
# TRY LINE 33 and 34 BEFORE RUN THIS !!!! | |
############################ | |
mysqldump --all-databases > /tmp/all.mysql.dump.sql | |
ps -ax | grep mysql | |
# stop and kill any MySQL processes | |
brew remove mysql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update | |
apt-get install build-essential \ | |
python-dev \ | |
libgdbm-dev \ | |
libbz2-dev \ | |
libc6-dev \ | |
libsqlite3-dev \ | |
libssl-dev \ | |
libreadline-dev \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# models.py | |
from django.db import models | |
from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin, BaseUserManager | |
class Profile(AbstractBaseUser, PermissionsMixin): | |
username = models.CharField( | |
'username', | |
max_length=30, | |
unique=True, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"color_scheme": "Packages/Theme - Brogrammer/brogrammer.tmTheme", | |
"font_face": "Inconsolata", | |
"font_size": 13, | |
"margin": 8, | |
"rulers": [120], | |
"translate_tabs_to_spaces": true, | |
"highlight_line": true, | |
"caret_style": "blink", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_random_color() { | |
var letters = '0123456789abcdef'.split(''); | |
var color = '#'; | |
for (var i = 0; i < 6; i++ ) { | |
color += letters[Math.round(Math.random() * 15)]; | |
} | |
return color; | |
} | |
>>> '#4eb4ad' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |