##GENERAL
- All Software Carpentry lessons
- Data Carpentry is a new sister organization focused on data management. Its lessons are growing.
- Mozilla Science
- Stack Overflow for all technical questions
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
##GENERAL
<?php | |
//An excerpt from Yii's index.php file | |
$yii_path=dirname(__FILE__).'/yii/yii.php'; | |
//The default set of config settings | |
$base_config = require(dirname(__FILE__).'/protected/config/main.php'); | |
// Optionally redefine local settings in $local_config_path. These include: |
# What if we had a row result from a database? | |
row = ['Mary','10', 'F'] | |
output = 'Name: {name}, age: {age}, gender: {gender}'.format(name=row[0], age=row[1], gender=row[2]) | |
print output | |
RailsBridge-VM:~/workspace/doublecheck$ more Gemfile | |
source 'https://rubygems.org' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '4.0.5' | |
# Use sqlite3 as the database for Active Record | |
# | |
group :development do |
import re | |
""" | |
I wrote my first decorator following Colin Myer's PyCon2014 'Intro to Decorators' talk. Wheee! | |
""" | |
def chefalize(phrase): | |
"""convert HTML to Swedish Chef-speak |
## UNCOMMENTED THIS: | |
# uncomment for a colored prompt, if the terminal has the capability; turned | |
# off by default to not distract the user: the focus in a terminal window | |
# should be on the output of commands, not on the prompt | |
force_color_prompt=yes | |
## CHANGED THE COLOR PROMPT TO SAY RailsBridge VM WITH COLORS |
require 'irb/completion' | |
# Make prompt red: use ANSI color code \033[0;31m | |
IRB.conf[:PROMPT][:RAILSBRIDGE] = { | |
:PROMPT_I => "\033[0;31m%N:line %03n >", | |
:PROMPT_S => "%N:line %03n:%l \033[0;31m ", | |
:PROMPT_C => "%N:line %03n:* \033[0;31m ", | |
:RETURN => "%s\n" | |
} |
""" | |
A script for downloading some podcasts and tagging the files so I can import them to iTunes. | |
""" | |
import pycurl | |
import os.path | |
import sys | |
from BeautifulSoup import BeautifulStoneSoup | |
import eyed3 |