- Create a project in XCode with the default settings
- iOS > Application > Single View Application
- Language: Swift
- Under project General settings, add ReactKit to Linked Framework and Libraries
- + > Add Other... and choose /path/to/react-native/ReactKit/ReactKit.xcodeproj
- Now ReactKit would have been imported. Link it by choosing it from the list.
- + > lib.ReactKit.a
- Under project Build Settings,
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
package com.fml.java.struts2.interceptor; | |
import java.io.CharArrayWriter; | |
import java.io.PrintWriter; | |
import java.util.*; | |
import javax.servlet.http.HttpServletResponse; | |
import javax.servlet.http.HttpServletResponseWrapper; | |
import org.apache.commons.lang.StringUtils; |
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
# render empty page from controller | |
render :nothing => true, :status => 200, :content_type => 'text/html' |
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
# how to add a migration to an extension | |
1. Under app folder: | |
> rails g migration add_a_field_to_a_table ... | |
2. Copy this migration from app db/migrate folder to extension db/migrate folder and rename the file: | |
> mv db/migrate/1222_add...rb <extension's db/migrate> | |
> # then rename the migration file to #_add... | |
3. still on app folder, run the following command to copy the migrate from extension to app: | |
> rake refinery_<extension name>:install:migrations |
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
find_source = lambda do |clazz, include_super=false| | |
files = clazz.methods(include_super).inject([]) {|c, m| c << clazz.method(m).source_location.first if clazz.method(m) and clazz.method(m).source_location; c } | |
files.uniq | |
end | |
puts find_source.call(Rails) | |
puts self.method(:get).source_location |
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
<div class="row bs-wizard"> | |
<div class="col-lg-3"> | |
<ol class="bs-wizard-sidebar"> | |
<li class="bs-wizard-todo bs-wizard-active"><a href="javascript:void(0)">Step1</a></li> | |
<li class="bs-wizard-todo"><a href="javascript:void(0)">Step2</a></li> | |
<li class="bs-wizard-todo"><a href="javascript:void(0)">Step3</a></li> | |
</ol> | |
</div> | |
<div class="col-lg-9"> |
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
<form novalidate="novalidate" id="signin-form" method="get" action="" accept-charset="UTF-8"> | |
<fieldset> | |
<legend>Please fill in your details</legend> | |
<div class="form-group"> | |
<label for="client_email">Email</label> | |
<div class="input-group"> | |
<span class="input-group-addon"><i class="icon-envelope"></i></span> | |
<input id="client_email" name="client[email]" class="required email form-control" placeholder="Your Email" type="text"> | |
</div> | |
</div> |
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
<div class="row bs-wizard"> | |
<div class="col-lg-3"> | |
<ol class="bs-wizard-sidebar"> | |
<li class="bs-wizard-todo bs-wizard-active"><a href="javascript:void(0)">Your Account Details</a></li> | |
<li class="bs-wizard-todo"><a href="javascript:void(0)">Your Website Details</a></li> | |
<li class="bs-wizard-todo"><a href="javascript:void(0)">Review and Sign up</a></li> | |
</ol> | |
</div> | |
<div class="col-lg-9"> | |
<form method="get" id="signup_form" class="new_client" action="" accept-charset="UTF-8"> |
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
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does | |
import hudson.model.*; | |
import hudson.util.*; | |
import jenkins.model.*; | |
import hudson.FilePath.FileCallable; | |
import hudson.slaves.OfflineCause; | |
import hudson.node_monitors.*; | |
for (node in Jenkins.instance.nodes) { |
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
#sudo apt-get remove maven2 | |
sudo add-apt-repository "deb http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main" | |
sudo apt-get update | |
sudo apt-get install maven3 | |
#If you encounter this: | |
#The program 'mvn' can be found in the following packages: | |
# * maven | |
# * maven2 |
OlderNewer