This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'ostruct' | |
POSSIBLE_ACTIONS = ['deploy', 'sync', 'ps', 'config', 'list-apps'] | |
def run_the_program | |
if ARGV.length == 1 | |
if ARGV.first.chomp == 'list-apps' | |
pretty_list_apps | |
end |
This file contains hidden or 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
<tr> | |
<td> </td> | |
<td valign="top"> | |
<p> </p> | |
<table width='100%'> | |
{{signature_line}} | |
</table> | |
</td> | |
<td> </td> | |
</tr> |
This file contains hidden or 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
class SessionsController < ApplicationController | |
def new | |
redirect_to '/auth/google_oauth2' | |
end | |
def create #google oauth callback endpoint | |
@account = Account.find session[:account_id] | |
auth = request.env["omniauth.auth"] |
This file contains hidden or 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
Rails.application.config.middleware.use OmniAuth::Builder do | |
scopes = [ | |
# we need the profile scope in order to login | |
"https://www.googleapis.com/auth/userinfo.profile", | |
"https://www.googleapis.com/auth/userinfo.email", | |
# this and other scopes could be added, but match them up with the | |
# features you requested in your API Console | |
"https://www.googleapis.com/auth/cloudprint" | |
] |
This file contains hidden or 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
<td width='40'><a href='http://www.linkedin.com/yourshop'><img src='http://admin.repairshopr.com/assets/templates/email-air/icon-linkedin.gif' width='21' style='border: none;outline: none;display: block;font-family: Arial, Helvetica, sans-serif;font-size: 12px;'></a></td> |
This file contains hidden or 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
We need a new library built :) | |
We use cloudprint for printing, the current library was designed incredibly poorly. | |
It uses globals and we have print jobs going to the wrong user when we use multi-threaded workers. | |
We need it to be instance based, so when you get an instance using the Class.new method, the credentials are contained there in the instance - not globals. | |
Old library: | |
https://github.com/minciue/cloudprint |
This file contains hidden or 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 Teamviewer | |
class Connector | |
attr_reader :client | |
def initialize | |
@client = connection(credentials) | |
end |
This file contains hidden or 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
class Togglr | |
attr_accessor :client, :workspace_id | |
def initialize(account) | |
@account = account | |
raise "NoToken" unless @account.settings.toggl_api_token | |
end | |
def client |
This file contains hidden or 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 WAAD | |
class Connector | |
attr_reader :client | |
def initialize | |
@client = connection(credentials) | |
end | |
def credentials |
This file contains hidden or 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
<table border="0" cellspacing="0" cellpadding="0" style="background:#ffffff;height:100%;margin:0;padding:0;width:100%; background:#f8f8f8;"> | |
<tr> | |
<td width="100%" align="center" valign='top'> | |
<span style="color: #E8E8E8; font-size: 10px;">----- REPLY ABOVE THIS LINE TO SEND A RESPONSE -----</span><br><br> | |
<table width="620" border="00" cellspacing="00" cellpadding="00" style="border:1px solid #dbdbdb; background:#fff;"> | |
<tr> | |
<td align="left" valign="top" style=" font-family:Arial, Helvetica, sans-serif; color:#181818; font-size:16px; padding-left: 25px;" height="650"><br /><br /> | |
{{email_body}} | |
</td> | |
</tr> |