diff --git a/circle.md b/circle.md index 45562e26..a6cdb47d 100644 --- a/circle.md +++ b/circle.md @@ -12,3 +12,83 @@ title: CircleCI * __deployment__: deploying your code to your web servers See: + +## Sample + +```yml +## Customize the test machine +machine: + + timezone: + America/Los_Angeles # Set the timezone + + # Version of ruby to use + ruby: + version: + 1.8.7-p358-falcon-perf + + # Override /etc/hosts + hosts: + circlehost: 127.0.0.1 + dev.mycompany.com: 127.0.0.1 + + # Add some environment variables + environment: + CIRCLE_ENV: test + DATABASE_URL: postgres://ubuntu:@127.0.0.1:5432/circle_test + +## Customize checkout +checkout: + post: + - git submodule sync + - git submodule update --init # use submodules + +## Customize dependencies +dependencies: + pre: + - npm install coffeescript # install from a different package manager + - gem uninstall bundler # use a custom version of bundler + - gem install bundler --pre + + override: + - bundle install: # note ':' here + timeout: 180 # fail if command has no output for 3 minutes + + # we automatically cache and restore many dependencies between + # builds. If you need to, you can add custom paths to cache: + cache_directories: + - "custom_1" # relative to the build directory + - "~/custom_2" # relative to the user's home directory + +## Customize database setup +database: + override: + # replace CircleCI's generated database.yml + - cp config/database.yml.ci config/database.yml + - bundle exec rake db:create db:schema:load + +## Customize test commands +test: + override: + - phpunit test/unit-tests # use PHPunit for testing + post: + - bundle exec rake jasmine:ci: # add an extra test type + environment: + RAILS_ENV: test + RACK_ENV: test + +## Customize deployment commands +deployment: + staging: + branch: master + heroku: + appname: foo-bar-123 + +## Custom notifications +notify: + webhooks: + # A list of hashes representing hooks. Only the url field is supported. + - url: https://someurl.com/hooks/circle +``` + +See: diff --git a/perl-pie.md b/perl-pie.md new file mode 100644 index 00000000..541f82f9 --- /dev/null +++ b/perl-pie.md @@ -0,0 +1,19 @@ +--- +title: Perl-pie +category: Development +--- + +### Search and replace + +```sh +perl -p -i -e 's/hello/hola/g' *.txt +``` + +### Back-referencing + +Use `\1` et al. + +```sh +# '@include align-items(center);' => 'align-items: center;' +perl -p -i -e "s/\@include (align-items)\((.*)\);/\1: \2;/g" +``` diff --git a/riot.md b/riot.md new file mode 100644 index 00000000..fd94a274 --- /dev/null +++ b/riot.md @@ -0,0 +1,151 @@ +--- +title: Riot.js +category: JavaScript libraries +--- + +## Tags + +```js +/* tag-name.tag */ + +
+ hello {name} +
+ + this.name = opts.name +
+``` + +```html + + + + + +``` + +## Expressions + +``` +{value} +{value || 'its a js expression'} + + /* null values ignore the tag */ +

+``` + +### Loops + +``` +

  • {title}
  • +``` + +### Conditional +``` +
    +
    /* show using display: '' */ +
    /* hide using display: none */ +``` + +### Events + +```js +