This file contains 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 "ViewController.h" | |
@interface ViewController () | |
@property (strong, nonatomic) NSMutableArray *messages; | |
@property (strong, nonatomic) JSQMessagesBubbleImage *incomingBubble; | |
@property (strong, nonatomic) JSQMessagesBubbleImage *outgoingBubble; | |
@property (strong, nonatomic) JSQMessagesAvatarImage *incomingAvatar; | |
@property (strong, nonatomic) JSQMessagesAvatarImage *outgoingAvatar; | |
This file contains 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
=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') |
This file contains 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 ruby | |
# A quick and dirty implementation of an HTTP proxy server in Ruby | |
# because I did not want to install anything. | |
# | |
# Copyright (C) 2009-2014 Torsten Becker <torsten.becker@gmail.com> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining | |
# a copy of this software and associated documentation files (the | |
# "Software"), to deal in the Software without restriction, including | |
# without limitation the rights to use, copy, modify, merge, publish, |
This file contains 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
=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') |
This file contains 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
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
This file contains 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
show_routes() { | |
#TODO ADD Usage | |
# remove {:id=>/\d+/} | |
if [ -z "$1" ]; then | |
bundle exec rake routes | sed -n 's/ */ | /gp' | |
else | |
bundle exec rake routes | grep $1 | sed -n 's/ */ | /gp' | |
fi | |
} |
This file contains 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
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm | |
git clone https://github.com/seebi/tmux-colors-solarized.git ~/.tmux/plugins/tmux-colors-solarized | |
cat ~/.tmux/plugins/tmux-colors-solarized/tmuxcolors-256.conf >> ~/.tmux.conf | |
echo "set -g @plugin 'seebi/tmux-colors-solarized'" >> ~/.tmux.conf | |
echo "set-option -g prefix C-o" >> ~/.tmux.conf | |
tmux source ~/.tmux.conf |
CoderDojo Advent Calendar 2021のの22日目を担当しています。 学生の時にCoder Dojoで少しプログラミングを小学生や中学生に教えていたことがあります。それがCoder Dojoとの出合いになります。
今回は、Coder Dojoとは直接は関係ないですが、 jagram(JApanese proGRAMming Language, ジャグラム)といRubyのプログラミングを日本語で書けるプログラミング言語ツールを開発したので、開発した背景とツールの使い方を紹介したいと思います。(Jagram、ジャグラムと読みます。JApanese proGRAMming Languageの略称です。厳密には言語ではなくRubyのツールです)
jagramはまだ作ったばかりなので、変更点たくさんあるかと思いますので、PRお待ちしております。githubへのスターもお待ちしてますw
また、実際に使われてなんぼなので、教育の現場で使っていただけると大変喜ばしいです。