Some notes on accessing / exporting Apple's Screen Time data
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
When looping through items in each, you can optionally reference the current loop index via {{@index}} | |
{{#each array}} | |
{{@index}}: {{this}} | |
{{/each}} | |
For object iteration, use {{@key}} instead: | |
{{#each object}} | |
{{@key}}: {{this}} |
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
server { | |
listen [::]:80; | |
listen 80; | |
server_name app.example.com; | |
return 301 https://$server_name$request_uri; | |
} | |
server { |
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
Template.myform.rendered = function () { | |
return Meteor.defer(function () { | |
return $('.item-select').typeahead({ | |
source: items |
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
if (Meteor.is_client) { | |
var userName = "PatelNachiket"; | |
Template.hello.greeting = function () { | |
return "Fetch recent tweets from Twitter stream of user : " ; | |
}; | |
Template.hello.events = { | |
'click #fetchButton' : function () { | |
console.log("Recent tweets from stream!"); | |
$('#fetchButton').attr('disabled','true').val('loading...'); |
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
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, app = module.exports = express.createServer(); | |
// Configuration | |
app.use(app.router); |
# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string
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
# this file should be config/initializers/smtp.rb | |
config_file = File.join(Rails.root.to_s, '/config/smtp.yml') | |
if File.exists? config_file | |
if smtp_config = YAML.load_file(File.expand_path(config_file))[Rails.env] | |
MyApp::Application.config.action_mailer.delivery_method = :smtp | |
MyApp::Application.config.action_mailer.smtp_settings = smtp_config | |
end | |
end |