Skip to content

Instantly share code, notes, and snippets.

View biancalpadilla's full-sized avatar

Bianca Padilla biancalpadilla

View GitHub Profile
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" style="background:#f9f9f9!important">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width">
<title>{{subject}}</title>
<style>
#!/bin/bash
# You can convert any csv file into a txt file by changing the extension to .txt
# Look for a file called file.txt
FILE=$(ls -1 | grep file.txt)
NAME=${FILE%%.txt}
# Save the first line in the file as your header
head -1 $FILE > header.txt
# Save the rest of file (line 2 and on) as your data file
#!/bin/bash
# You can convert any txt file into a csv file by changing the extension to .csv
# Look for a file called file.csv
FILE=$(ls -1 | grep file.csv)
NAME=${FILE%%.csv}
# Save the first line in the file as your header
head -1 $FILE > header.csv
# Save the rest of file (line 2 and on) as your data file
<div class="description-container">
<div class="row description-row">
<div class="col-md-12 description-section-1">
<p class="description-paragraph-1">
<p>Tranquility ATN Briefs is a tab-style diaper for overnight protection. These come in 6 sizes ranging from XS to 2XL. If you’re looking for a larger size, try Tranquility DayTime Pull-Up Underwear.</p>
<p>The waist size for these tabbed diapers fit between 18 to 80 inches, depending on which size you choose. The absorbecy ranges between 21.3 fl oz (2.7 cups) to 34 fl oz (4.25 cups) depending on size. For reference, the average adult releases 8-12 fl ounces (½ - ⅔ cups) when they “go”.</p>
<p>Tranquility ATN Briefs is our best-selling, top-rated product - and they’re our customer's favorite! They’re made of soft, premium fabric that is breathable and silent to wear. Tranquility’s absorbent peach mat core helps keep skin dry, reduces odor and stops bacteria growth. The Premium OverNights
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" style="background:#f9f9f9!important">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width">
<title>{{subject}}</title>
<style>
@biancalpadilla
biancalpadilla / application_controller.rb
Last active September 6, 2018 01:20
bigcommerce omniauth
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
after_action :set_header_for_iframe
helper_method :current_store
helper_method :current_connection
private
@biancalpadilla
biancalpadilla / custom_logger.rb
Created August 28, 2018 21:23 — forked from kinopyo/custom_logger.rb
Custom logger file in Rails
# lib/custom_logger.rb
class CustomLogger < Logger
def format_message(severity, timestamp, progname, msg)
"#{timestamp.to_formatted_s(:db)} #{severity} #{msg}\n"
end
end
logfile = File.open("#{Rails.root}/log/custom.log", 'a') # create log file
logfile.sync = true # automatically flushes data to file
CUSTOM_LOGGER = CustomLogger.new(logfile) # constant accessible anywhere
/* 1. Open HTML Editor
2. Search for (Ctrl/Command + F) "description-table-responsive"
3. Delete everything above that line
4. Copy the following code
5. Close HTML Editor
6. Edit using normal editor such as adding bullet points using the bullet point button.
*/
<div class="description-container">
<div class="row description-row">
<div class="col-md-8 col-sm-12 description-section-1">
def address_verification(order)
shipping = Bigcommerce.find_shipping(order.id).first
address = verify_address(shipping)
unless address['deliverability'] == 'deliverable' ||
address['deliverability'] == 'deliverable_unnecessary_unit'
notes = order.staff_notes + "\n" + footnotes(address)
Bigcommerce.update_staff_notes(order.id, notes)
Bigcommerce.update_order_status_id(order.id, ENV['manual_verification'])
end
var mail = "[email protected]";
//username is public API Key
var url = "https://bpi.briteverify.com/emails.json?address="+mail+"&username=";
$.ajax({
url: url,
dataType: "jsonp",
success: function(data){
var status = data.status;
if(status === 'valid') {
console.log('success')