- API docs
- How to bootstrap a project
- Application structure (M/V/C layers and what they're for)
- Getting started with Ember and Rails
- Built-in controls
- How events are handled and bubbled
Adapter.map(function() { | |
this.resources('post', {path: '/blog-posts/:post_id'}, function() { | |
this.resources('comments'); // assumes has-many called 'comments' and inverse called 'post' | |
this.resource('owner', {type: 'user'}); | |
}); | |
}); |
import webpack from "webpack"; | |
import ExtractTextPlugin from "extract-text-webpack-plugin"; | |
import CopyWebpackPlugin from "copy-webpack-plugin"; | |
import WebpackNotifierPlugin from "webpack-notifier"; | |
import path from "path"; | |
const ENV = process.env.NODE_ENV || "development"; | |
const IS_PROD = ENV === "production"; | |
const OUTPUT_PATH = path.resolve(__dirname, "..", "priv", "static"); |
Get the font files from http://octicons.github.com and copy the octicons-local.ttf
file to the /resources
directory at the root of your project.
my_icon = NSMutableAttributedString.alloc.initWithString("\uf00e")
my_icon.addAttribute(NSFontAttributeName, value: NSFont.fontWithName("github-octicons",size:30), range: NSMakeRange(0, 1))
The string in initWithString
will be the unicode value of the char that represents the icon you want. You can check the unicode value for the icons in the CSS file that comes when you download the font.You can also get the unicode value when you select an icon on octicons.github.com.
# Migrate schema and data from Mongoid to MySQL ActiveRecord | |
class MongoidMysqlMigrator | |
def randomize_auto_increment_values(source_models, from=5500, to=10500) | |
source_models.each do |model| | |
value = rand(from-to)+from | |
sql = %(ALTER TABLE #{model.name.tableize} AUTO_INCREMENT=#{value}) | |
puts sql | |
ActiveRecord::Base.connection.execute(sql) | |
end |
Even though there is a nice XBMC add-on to configure your WIFI settings, sometimes, you may still want to setup the WIFI connection for many reasons or just for fur.
OpenELEC use connman for managing connection to the various available network.
Setuping connman to connect to your protected WIFI network is an easy requiring you only to create a config file and enter some commands in a shell.
# | |
# Apple SuperDrive initialization rule | |
# | |
# See: https://gist.github.com/yookoala/818c1ff057e3d965980b7fd3bf8f77a6 | |
ACTION=="add", ATTRS{idProduct}=="1500", ATTRS{idVendor}=="05ac", DRIVERS=="usb", RUN+="/usr/bin/sg_raw %r/sr%n EA 00 00 00 00 00 01" |
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Created: 2010/12/05 | |
// Updated: 2018/09/12 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
// |