For future blog post:
This file contains hidden or 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
# Very rough draft | |
# TODO: Clean up, extract into multiple objects and then convert to a | |
# gem/executable. | |
class TaskFinder | |
def initialize(outdated_branch, updated_branch) | |
@outdated_branch = outdated_branch | |
@updated_branch = updated_branch | |
end | |
def updated_tasks_and_branches |
This file contains hidden or 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
# This file should be placed in the root directory of an application using | |
# the Rubocop gem. For a sense of the most common Rubocop complaints in your | |
# project, run `rubocop --format offenses` to see a list of the most common | |
# issues. In addition, you can run rubocop -a to allow Rubocop to autocorrect | |
# some of the issues it detects. On one project, this made several thousand | |
# changes and led to only two issues, one from the Lint/DeprecatedClassMethods | |
# cop and one from Style/Blocks. | |
# For use with rubocop-rspec gem | |
require: rubocop-rspec |
A list of resources that aspiring Rails developers can use to learn Rails and other relevant technologies. This list includes some resources that I see recommended all over the web--not all of which I like--as well as some hidden gems that I've found valuable. This list is intended to supplement my blog post here.
- Codecademy
- One of the more well-known sites to offer interactive programming tutorials, Codecademy is probably best utilized by those who are pretty new to programming, though the Ruby tutorial is good for teaching Ruby syntax and eventually gets into some less trivial material.
- Try Ruby
- Pretty similar to Codecademy. Once again, it's beginner-friendly, though, as someone who knew about object-oriented programming beforehand, I found it somewhat annoying to use, as there's no page with links to the individual exercises (at le
This file contains hidden or 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 sys | |
from hn import HN | |
hn = HN() | |
print "Enter number of stories you'd like to view: " | |
n = raw_input() | |
while not n.isdigit(): | |
print "Enter an integer: " | |
n = raw_input() | |
n = int(n) |
This file contains hidden or 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 random | |
target = random.randint(1,100) | |
#print target | |
for i in range(5): | |
print "Guess a number between 1 and 100 (inclusive): " | |
guess = raw_input() | |
guess = int(guess) | |
print guess |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/wait.h> | |
#include <string.h> | |
#include <sys/stat.h> | |
/* | |
* This program works as a simple Linux shell. Linux commands with up to four arguments are supported, |
This file contains hidden or 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
#!/usr/bin/env python | |
""" | |
A simple clone of the game Snake made to expose myself to Python/Pygame. Inspired by the guide in | |
the Raspberry Pi User Guide by Eben Upton and Gareth Halfacree, though I did make some changes | |
based on my preferences and coding style. | |
""" | |
import pygame, sys, time, random | |
from pygame.locals import * |
This file contains hidden or 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
var http = require('http'); | |
var server = http.createServer(function(req,res) { | |
res.writeHead(200, {'Content-Type':'text/plain'}); | |
res.end('Hello World\n'); | |
}); | |
server.listen(1337); | |
console.log('Server running at http://192.168.33.10:1337/'); |
This file contains hidden or 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
/* | |
JS guessing game that picks a random number between 1 and 100 and prompts the user for up to five guesses. | |
The program then prints if the correct number is less than, greater than or equal to the guess. If five | |
guesses are completed without getting the right number, a loss message is output. | |
*/ | |
var correct = Math.floor(Math.random()*100)+1; | |
console.log(correct); | |
var readLine = require('readline'), rl = readLine.createInterface(process.stdin, process.stdout); |