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
def send_emails | |
mg_client = Mailgun::Client.new ENV["MAILGUN_API_KEY"] | |
mb_obj = Mailgun::BatchMessage.new(mg_client, ENV["MAILGUN_DOMAIN"]) | |
mb_obj.set_from_address(ENV["MAILGUN_EMAIL"], | |
{"first"=>"Firs tname", | |
"last" => "Last name" | |
} | |
); | |
mb_obj.set_subject("New message!"); |
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
import glob | |
import os | |
import base64 | |
import requests | |
from PIL import Image | |
import io | |
pintrest_api = 'https://api.pinterest.com/v1/pins/' |
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
import glob | |
from shutil import copyfile | |
import shutil | |
import os | |
i=0 | |
search_template = 'C:/**/*ert*.jpg' | |
copy_to = 'C:/Pintrest/' |
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
<script> | |
function resize(id){ | |
var width1 = (window.innerWidth > 0) ? window.innerWidth : screen.width; | |
var height1 = (window.innerHeight > 0) ? window.innerHeight : screen.height; | |
var height1 = height1 * 0.8; | |
document.getElementById(id).height = height1; | |
document.getElementById(id).width = width1; | |
} | |
</script> |
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
private ArrayList<JSONObject> getFilteredList(JSONArray options){ | |
Map<String, JSONObject> map = new ArrayMap<>(); | |
for (int i = 0; i < options.length(); i++){ | |
try { | |
JSONObject object = options.getJSONObject(i); | |
String key = object.getString("Order_Type__c") + object.getString("Opp_SFID__c"); | |
if (!map.containsKey(key)){ |
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
package com.gwexhibits.timemachine.adapters; | |
import android.content.Context; | |
import android.support.annotation.Nullable; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.Button; | |
import android.widget.ImageView; |
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
package com.gwexhibits.timemachine.adapters; | |
import android.support.annotation.Nullable; | |
import android.support.v7.widget.RecyclerView; | |
import android.support.v7.widget.StaggeredGridLayoutManager; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.TextView; |
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
@Override | |
public void onBackPressed() { | |
FragmentManager fm = getSupportFragmentManager(); | |
for (Fragment frag : fm.getFragments()) { | |
if (frag.isVisible()) { | |
FragmentManager childFm = frag.getChildFragmentManager(); | |
if (childFm.getBackStackEntryCount() > 0) { | |
childFm.popBackStack(); | |
return; | |
} |
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
# Drop all local DB | |
# Make dump in Heroku | |
# Import dump in locacl development DB | |
# Update schema.rb | |
bundle exec rake db:schema:dump | |
# Update test DB | |
bundle exec rake db:schema:load |
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
function (user, context, callback) { | |
if (context.clientID === 'CLIENT_ID' && context.protocol === 'delegation') { | |
// set AWS settings | |
context.addonConfiguration = context.addonConfiguration || {}; | |
context.addonConfiguration.aws = context.addonConfiguration.aws || {}; | |
context.addonConfiguration.aws.principal = 'arn:aws:iam::...'; // Identity Provider ARN | |
context.addonConfiguration.aws.role = 'arn:aws:iam::...'; // Role ARN | |
} | |
callback(null, user, context); |
OlderNewer