Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
# in spec/support/omniauth_macros.rb | |
module OmniauthMacros | |
def mock_auth_hash | |
# The mock_auth configuration allows you to set per-provider (or default) | |
# authentication hashes to return during integration testing. | |
OmniAuth.config.mock_auth[:twitter] = { | |
'provider' => 'twitter', | |
'uid' => '123545', | |
'user_info' => { | |
'name' => 'mockuser', |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
diff --git a/Makefile b/Makefile | |
index 33bfb0a..af625c8 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -29,10 +29,10 @@ OBJS = \ | |
vm.o\ | |
# Cross-compiling (e.g., on Mac OS X) | |
-#TOOLPREFIX = i386-jos-elf- | |
+TOOLPREFIX = /opt/gnu/bin/i386-jos-elf- |
group :test do | |
gem 'capybara' | |
gem 'poltergeist' # gem 'capybara-webkit' | |
gem 'database_cleaner' | |
end |
IE6 Only | |
================== | |
_selector {...} | |
IE6 & IE7 | |
================== | |
*html or { _property: } | |
IE7 Only | |
================== |
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.
Use production SSL certificates locally. This is annoying
class InstrumentedPromise extends Promise { | |
constructor(...args) { | |
super(...args); | |
console.log("constructed"); | |
} | |
then(...args) { | |
console.log("then'd"); | |
return this.constructor.cast(super(...args)); | |
} |
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32 | |
global start | |
section .text | |
start: | |
push dword msg.len | |
push dword msg | |
push dword 1 | |
mov eax, 4 |
// NSLog Tokens | |
// ---------------------------------------------------- | |
// Symbol .........|...Displays | |
// %@ .............|...id | |
// %d,%D,%i .......|...long | |
// %u,%U ..........|...unsigned long | |
// %hi ............|...short | |
// %hu ............|...unsigned short | |
// %qi ............|...long long | |
// %qu ............|...unsigned long long |