To keep the changes from the commit you want to undo
$ git reset --soft HEAD^
To destroy the changes from the commit you want to undo
$ git reset --hard HEAD^
You can also say
To keep the changes from the commit you want to undo
$ git reset --soft HEAD^
To destroy the changes from the commit you want to undo
$ git reset --hard HEAD^
You can also say
| sudo pip install awscli | |
| aws configure | |
| aws ses send-email \ | |
| --from "john@gmail.com" \ | |
| --destination "ToAddresses=mike@gmail.com" \ | |
| --message "Subject={Data=from ses,Charset=utf8},Body={Text={Data=ses says hi,Charset=utf8},Html={Data=,Charset=utf8}}" |
This is a quick guide for installing memcached on a Mac with Homebrew, and starting and stopping it with Lunchy. I hope this tutorial will get your memcached up and running in no time.
Installing Homebrew is super easy. Just paste this in your terminal —
$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"| require 'rails_helper' | |
| RSpec.describe TodosController, :type => :controller do | |
| describe "GET #index" do | |
| #describe "POST #create" do | |
| #describe "GET #show" do | |
| #describe "PATCH #update" do (or PUT #update) | |
| #describe "DELETE #destroy" do | |
| #describe "GET #new" do |
| # put this in your staging.rb file. Obviously you'll need more config than this it's just an example. | |
| Rails.application.configure do | |
| config.action_mailer.preview_path ||= defined?(Rails.root) ? "#{Rails.root}/test/mailers/previews" : nil | |
| config.autoload_paths += [config.action_mailer.preview_path] | |
| routes.append do | |
| get '/rails/mailers' => "rails/mailers#index" | |
| get '/rails/mailers/*path' => "rails/mailers#preview" | |
| end |
| ::States = { AK: "Alaska", | |
| AL: "Alabama", | |
| AR: "Arkansas", | |
| AS: "American Samoa", | |
| AZ: "Arizona", | |
| CA: "California", | |
| CO: "Colorado", | |
| CT: "Connecticut", | |
| DC: "District of Columbia", | |
| DE: "Delaware", |
| // MIT: http://opensource.org/licenses/MIT | |
| angular.module('app', []); | |
| angular.module('app').controller | |
| ( 'MainCtrl' | |
| , function($scope,$locale) { | |
| $scope.currentYear = new Date().getFullYear() | |
| $scope.currentMonth = new Date().getMonth() + 1 | |
| $scope.months = $locale.DATETIME_FORMATS.MONTH |
| class Person | |
| def initialize(attributes) | |
| attributes.each do |attribute_name, attribute_value| | |
| ##### Method one ##### | |
| # Works just great, but uses something scary like eval | |
| # self.class.class_eval {attr_accessor attribute_name} | |
| # self.instance_variable_set("@#{attribute_name}", attribute_value) | |
| ##### Method two ##### | |
| # Manually creates methods for both getter and setter and then |