Skip to content

Instantly share code, notes, and snippets.

View tylerwillingham's full-sized avatar

Tyler Willingham tylerwillingham

View GitHub Profile
@tylerwillingham
tylerwillingham / general.php
Last active August 29, 2015 13:55
Craft CMS: Full default config
<?php
/**
* General Configuration
*
* All of your system's general configuration settings go in here.
* You can see a list of the default settings in craft/app/etc/config/defaults/general.php
*
* Current as of Craft 1.3.2473
*/
@tylerwillingham
tylerwillingham / Output HTML
Last active August 29, 2015 13:58
Trying to see if I'm doing something wrong since bind-attr doesn't appear to be working as expected..
<ul id="todo-list">
<script id="metamorph-3-start" type="text/x-placeholder"></script><script id="metamorph-0-start" type="text/x-placeholder"></script>
<li class="" data-bindattr-1="1">
<input type="checkbox" class="toggle">
<label><script id="metamorph-4-start" type="text/x-placeholder"></script>Learn Ember.js<script id="metamorph-4-end" type="text/x-placeholder"></script></label><button class="destroy"></button>
</li>
<script id="metamorph-0-end" type="text/x-placeholder"></script><script id="metamorph-1-start" type="text/x-placeholder"></script>
<li class="" data-bindattr-2="2">
<input type="checkbox" class="toggle">
<label><script id="metamorph-5-start" type="text/x-placeholder"></script>...<script id="metamorph-5-end" type="text/x-placeholder"></script></label><button class="destroy"></button>
@tylerwillingham
tylerwillingham / bimmerpostStories.py
Created June 14, 2014 18:40
Retrieves story titles and urls from bimmerpost.com
from bs4 import BeautifulSoup
import requests
story_qty = int(raw_input('How many stories do you want to get? '))
page = 1
story_count = 0
stories = []
# Get the data to filter for a given page
def getPageData():
# Ability to put ^ in validation messages to override the prefix
gem "custom_error_message"
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
rake db:migrate
rake aborted!
could not connect to server: Permission denied
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
rake db:migrate
rake aborted!
could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (fe80::1) and accepting
sudo -u postgres createuser -D -P rails
Password:
could not identify current directory: Permission denied
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) y
Password:
sudo -u postgres createuser -D -P rails
Password:
could not identify current directory: Permission denied
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) y
Password:
@tylerwillingham
tylerwillingham / site.com.conf
Created April 30, 2012 22:08
nginx vhost config
server {
listen 80;
server_name staging.site.com;
error_log url_to_nginx-error.log;
access_log url_to_nginx-access.log;
root /srv/http/nginx/site.com/staging/root;
location / {