- 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 variable is for demonstration only, but the naming convention is a shorthand for: | |
| ** $globalVar-spacingVar-baseline | |
| */ | |
| $g-s-baseline: 23px; | |
| /* You could imagine different variables following the same pattern, for example: | |
| ** $g-c-blue (global, color, blue) | |
| ** $l-f-sans (local/themed, font, sans-serif) | |
| */ |
| # Kickoff - the quickest way to start new rails apps | |
| # How it works: | |
| # 1. Install the gem: `$ gem install kickoff-rails` | |
| # 2. Generate your kickoff file `$ kickoff new` | |
| # 3. Edit the kickoff file to specify the foundation of your app | |
| # 4. Generate your app: `$ kickoff` | |
| # Set up default gems | |
| gems = ['omniauth', 'omniauth-twitter', 'pg', 'airbrake'] |
| # Put this method in your helper file to render inline SVG | |
| def inline_svg(path) | |
| file = File.open("app/assets/images/#{path}", "rb") | |
| raw file.read | |
| end |
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).
Faux-3d SVG globe using d3.geo.orthographic and a few radial gradients. Labels offset or hidden based on radians from current map center to enhance the effect.
Uncomment svg.append("g").attr("class","countries") for hover-able country outlines.
| #!/usr/bin/env bash | |
| uninstall() { | |
| list=`gem list --no-versions` | |
| for gem in $list; do | |
| gem uninstall $gem -aIx | |
| done | |
| gem list | |
| gem install bundler | |
| } |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| module BootstrapPaginationHelper | |
| class LinkRenderer < WillPaginate::ActionView::LinkRenderer | |
| protected | |
| def page_number(page) | |
| unless page == current_page | |
| link(page, page, :rel => rel_value(page)) | |
| else | |
| link(page, "#", :class => 'active') | |
| end |
| This is gist. | |
| There are many like it, but this one is mine. | |
| It is my life. | |
| I must master it as I must master my life. | |
| Without me gist is useless. | |
| Without gist, I am useless. |