- AWS Account
- Linux(like) System
- awscli
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
-- enable extensions | |
-- full-text search on postgresql | |
CREATE EXTENSION unaccent; | |
-- languages supported | |
CREATE TEXT SEARCH CONFIGURATION fr ( COPY = french ); | |
ALTER TEXT SEARCH CONFIGURATION fr ALTER MAPPING | |
FOR hword, hword_part, word WITH unaccent, french_stem; | |
CREATE TEXT SEARCH CONFIGURATION en ( COPY = english ); |
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
import urllib | |
from wordpress_xmlrpc import Client, WordPressPost | |
from wordpress_xmlrpc.methods import posts | |
import xmlrpclib | |
from wordpress_xmlrpc.compat import xmlrpc_client | |
from wordpress_xmlrpc.methods import media, posts | |
import os | |
########################### Read Me First ############################### | |
''' | |
------------------------------------------In DETAIL-------------------------------- |
An interactive CSS star rating component.
Has hover and selected states, and could be integrated into a form very easily (as underneath the visual styling it is just radio buttons). Size and margin between the stars can be easily changed by amending the sass variables.
No JS, all CSS and HTML.
Works on IE9>, Chrome, Firefox, Safari
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
#!/bin/bash | |
# Enter /opt folder (common folder for user installed programs) | |
# This script assumes you have proper permissions on /opt | |
cd /opt | |
# Download GitKraken | |
wget https://release.gitkraken.com/linux/gitkraken-amd64.tar.gz | |
# Extract the Kraken into /opt directory |
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
vi /etc/environment | |
add these lines... | |
LANG=en_US.utf-8 | |
LC_ALL=en_US.utf-8 |
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
" Don't try to be vi compatible | |
set nocompatible | |
" Helps force plugins to load correctly when it is turned back on below | |
filetype off | |
" TODO: Load plugins here (pathogen or vundle) | |
" Turn on syntax highlighting | |
syntax on |
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
#!/bin/bash | |
# According to: | |
# How To Set Up Python 2.7.6 and 3.3.3 on CentOS 6.4 | |
# https://www.digitalocean.com/community/tutorials/how-to-set-up-python-2-7-6-and-3-3-3-on-centos-6-4 | |
yum -y update | |
yum groupinstall -y 'development tools' | |
yum install -y zlib-dev openssl-devel sqlite-devel bzip2-devel | |
yum install xz-libs | |
wget http://www.python.org/ftp/python/2.7.10/Python-2.7.10.tar.xz |
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
#!/bin/bash | |
## Assuming Linux Mint 18. Should also mostly work with Ubuntu 16.04 | |
## Installing .deb packages could be done in a single go if I added the | |
## necessary repositories beforehand but this way the script is more | |
## modular and I can comment out any sections if I want to. | |
## TODO: install Prey | |
## TODO: Rewrite this with Salt/Ansible? |
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
from django.db import models | |
class Person(models.Model): | |
_first_name = models.CharField(max_length=30, db_column='first_name') | |
last_name = models.CharField(max_length=30) | |
@property | |
def first_name(self): | |
"""your logic here, return value""" | |
return "foo" |
NewerOlder