Rails flash messages with AJAX requests
ko.extenders.persist = function (target, option) { | |
target.subscribe(function (newValue) { | |
window.localStorage.setItem(option, newValue); | |
}); | |
return target; | |
}; | |
//and use it like this: | |
var item = ko.observable().extend({persist:"storedItem"}); |
Host github.com | |
Hostname ssh.github.com | |
Port 443 |
redis-cli -h <HOST> -p <PORT> KEYS <PATTERN> | xargs redis-cli -h <HOST> -p <PORT> DEL |
ls -1 /usr/local/Library/LinkedKegs | while read line; do echo $line; brew unlink $line; brew link --force $line; done | |
brew list -1 | while read line; do brew unlink $line; brew link $line; done |
We want to see your skills related to taking a design and implementing it in html/css, reading Ember documentation and putting together a simple app, breaking the html into components, loading dynamic data.
We've set up an Ember environment that bootstraps and configures an Ember app with everything you need. Feel free to work on it by either forking the Twiddle or downloading the code and editing it locally, whichever you are more comfortable with.
- Please take the design in the attached file and implement it using modern html and css.
- Integrate the html and css into the ember app by customizing the template in templates/application.hbs
- Make a get request to "/activities" in routes/application.js when the application loads and send that data to your template
- Load the data from your request into the card components inside your template. You may choose to simply include the HTML markup in a loop or use a component. That's your call!
var gulp = require('gulp'), | |
gutil = require('gulp-util'), | |
sass = require('gulp-sass'), | |
sourcemaps = require('gulp-sourcemaps'), | |
livereload = require('gulp-livereload'), // Livereload plugin needed: https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei | |
autoprefixer = require('gulp-autoprefixer'), | |
uglify = require('gulp-uglify'), | |
concat = require('gulp-concat'); | |
var onError = function (err) { |
#!/bin/bash | |
# This script makes it possible to update a Namecheap dynamic DNS | |
# A record automatically using a cron job | |
# configure these | |
dnshost="host" | |
dnsdomain="example.com" | |
dnspw="longasspasswd" |
There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore
is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules
directory) as well as files that are generated (and regenerated) as artifacts of a build process.
All other files should be in your own global gitignore file. Create a file called .gitignore
in your home directory and add anything you want to ignore. You then need to tell git where your global gitignore file is.
git config --global core.excludesfile ~/.gitignore
git config --global core.excludesfile %USERPROFILE%\.gitignore