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
Update system date with: | |
sudo ntpdate us.pool.ntp.org | |
That'll fix it! |
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
<div class="contact-details" itemscope="" itemtype="http://schema.org/Organization"><span itemprop="name" class="hide">Shimmering Careers</span><p><b style="font-size: 1.2em; line-height: 1.6em;">Our Offices:</b></p><p itemprop="address" itemscope="" itemtype="http://schema.org/PostalAddress"><span itemprop="streetAddress">1777 Borel Place, Suite 440</span>, <span itemprop="addressLocality">San Mateo</span>, <span itemprop="addressRegion">CA</span><span itemprop="postalCode"> 94402</span></p><p itemprop="address" itemscope="" itemtype="http://schema.org/PostalAddress"><span itemprop="streetAddress">1220 University Drive, Suite 104</span>, <span itemprop="addressLocality">Menlo Park</span>, <span itemprop="addressRegion">CA</span><span itemprop="postalCode"> 94025</span></p><p><b>Phone:</b> <a data-original-title="" href="tel:650-464-0085" title=""><span itemprop="telephone">650-464-0085</span></a></p><p><span><b>Toll-Free: </b></span><a data-original-title="" href="tel:1-877-796-9737" title="Toll-fr |
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
// jQuery shuffle plugin usage $('el').shuffle(); | |
(function($){ | |
$.fn.shuffle = function() { | |
var elements = this.get(); | |
var copy = [].concat(elements); | |
var shuffled = []; | |
var placeholders = []; | |
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
from bs4 import BeautifulSoup | |
## TODO: Add wrapper for non-input fields and embed fields into labels | |
def exctract_field(el): | |
print el | |
inputs = el.find_all('input') | |
if inputs: | |
return inputs, "input" | |
selects = el.find_all('select') |
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
from suds import WebFault | |
from suds.client import Client | |
from bc_api.models.crm import * | |
import csv | |
def delete_from_bc(site, entityId): | |
url = str(site.secure_site_url + 'catalystwebservice/catalystcrmwebservice.asmx?WSDL') | |
client = Client(url) | |
try: | |
response = client.service.Contact_DeleteByEntityID( |
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
// JavaScript code that finds dates for today, this weekend, this month, next month | |
// This weekend = next Sat and Sun | |
// This month = today to end of this month | |
// Next month = 1st of next month = end of next month | |
// Useful on Business Catalyst web app search form for searching from-to dates | |
// Requires jquery and moment.js | |
$(document).ready(function(){ | |
$('#today_nav').on("click", function(){ |
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
# Extracts MP3 file links from Business Catalyst RSS feed | |
from urllib import urlopen | |
import re | |
source = urlopen('http://www.businesscatalyst.com/RSSRetrieve.aspx?ID=41&Type=RSS20').read() | |
link = re.compile('<a href=(.*)\.mp3') | |
find_link = re.findall(link, source) | |
for link in find_link: | |
print "Link: %s \n" %link |
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 os | |
to_replace = """eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmco...9DQp9"));""" | |
for dname, dirs, files in os.walk("/Users/mariogudelj/code/device.com/public_html/"): | |
for fname in files: | |
fpath = os.path.join(dname, fname) | |
with open(fpath) as f: | |
s = f.read() | |
found = s.find(to_replace) | |
if(found != -1): | |
print fpath |