This is a test
- one
- two
- three
# Step 1: Ensure that all of the configuration is wired into the main configuration.yaml file. | |
# I've just so happen to split out my config files, but you can embed all of the following | |
# in this file if you so choose. | |
# https://www.home-assistant.io/docs/configuration/splitting_configuration/ | |
sensor: !include sensors.yaml | |
template sensors: !include template_sensors.yaml | |
weather: !include weather.yaml |
ActiveRecord::Base.include(Maven::ArelProxy::ActiveRecordExtension) |
# add this to your project specific .gitignore | |
# Ignore pry console history for this project - https://gist.github.com/phil-monroe/96bfde675e50ca2dd7080348565b887d | |
.pry_history |
# Include this in the config/application.rb of your rails application | |
require 'colorize' | |
ActiveSupport::Dependencies.singleton_class.prepend(Module.new do | |
def load_missing_constant(*args) | |
arg_str = args.map(&:to_s).select { |arg| arg != 'Object' }.join('::').green | |
start = Time.now | |
result = nil | |
mv_with_indent do |indent| |
public class AMIUtils { | |
static String SELL_WITH_AMI_PACKAGE = "com.maven_labs.maven"; | |
public static void openSellWithAMI(Context context) { | |
if(isPackageInstalled(SELL_WITH_AMI_PACKAGE, context.getPackageManager())) { | |
openLink("mavenami://", context); | |
} else { | |
try { | |
openLink("market://details?id=" + SELL_WITH_AMI_PACKAGE, context); |
var all = $("[class]") | |
all.map(function(idx, el) { console.log({ el: el.tagName, id: el.id, class: $(el).attr('class') } ) } ) |
const crawler = new Apify.PuppeteerCrawler({ | |
launchPuppeteerFunction: () => { | |
return Apify.launchPuppeteer({ | |
// puppeteer config options | |
}).then((browser) => { | |
browser.on('disconnected', console.log) | |
browser.on('targetchanged', console.log) | |
browser.on('targetcreated ', console.log) | |
browser.on('targetdestroyed', console.log) | |
return browser |
class Admin::OauthController < ApplicationController | |
def self.authenticated?(request) | |
session = request.session | |
session[:email].present? && session[:authenticated_at].present? && (Time.at(session[:authenticated_at]) + 24.hours).future? | |
end | |
def self.current_user(request) | |
session = request.session | |
OpenStruct.new(email: session[:email], | |
name: session[:name], |
var page = require('webpage').create(); | |
page.onConsoleMessage = function(msg, lineNum, sourceId) { | |
console.log('CONSOLE: ' + msg); | |
}; | |
page.open('https://seneweb.senegence.com/us/products/anti-aging/collagen-night-pak/', function() { | |
page.includeJs("https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js", function() { | |
page.evaluate(function() { |
This is a test