UPDATE 2014-12-21: RubyGems 1.8.30, 2.0.15 and 2.2.3 have been released. It requires manual installation, please see instructions below.
Hello,
If you reached this page, means you've hit this SSL error when trying to
# install and make run basic bootstrap date-picker functionality described here http://www.eyecon.ro/bootstrap-datepicker/ | |
# app/assets/javascript/datepicker.js.coffee | |
$(document).on 'pageChanged', -> | |
# datepicker for simple_form & Ransack | |
$(".custom_datepicker_selector").datepicker().on 'changeDate', (en) -> | |
correct_format = en.date.getFullYear() + '-' + ('0' + (en.date.getMonth() + 1)).slice(-2) + '-' + ('0' + en.date.getDate()).slice(-2) # date format yyyy-mm-dd | |
$(this).parent().find("input[type=hidden]").val(correct_format) |
from lxml import etree | |
data = open('D:\Conversion\MACSXML_Parts.xslt') | |
xslt_content = data.read() | |
xslt_root = etree.XML(xslt_content) | |
dom = etree.parse('D:\Conversion\Cat2015UF.xml') | |
transform = etree.XSLT(xslt_root) | |
result = transform(dom) | |
f = open('D:\Conversion\MACSXML_Parts.csv', 'w') | |
f.write(str(result1)) |
from lxml import etree | |
data = open('D:\Conversion\MACSXML_Parts.xslt') | |
xslt_content = data.read() | |
xslt_root = etree.XML(xslt_content) | |
dom = etree.parse('D:\Conversion\Cat2015UF.xml') | |
transform = etree.XSLT(xslt_root) | |
result = transform(dom) | |
f = open('D:\Conversion\MACSXML_Parts.csv', 'w') | |
f.write(str(result1)) |
# see also: http://code.activestate.com/recipes/578150-sending-non-ascii-emails-from-python-3/ | |
import os | |
import smtplib | |
from email.utils import formataddr | |
from email.utils import formatdate | |
from email.utils import COMMASPACE | |
from email.header import Header |
UPDATE 2014-12-21: RubyGems 1.8.30, 2.0.15 and 2.2.3 have been released. It requires manual installation, please see instructions below.
Hello,
If you reached this page, means you've hit this SSL error when trying to
from pygments import highlight | |
from pygments.lexers import PythonLexer | |
from pygments.formatters import Terminal256Formatter | |
from pprint import pformat | |
def pprint_color(obj): | |
print highlight(pformat(obj), PythonLexer(), Terminal256Formatter()) |
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |
# Usage: bundle exec rake sidekiq:restart RAILS_ENV=<environment name> | |
namespace :sidekiq do | |
sidekiq_pid_file = Rails.root+'tmp/pids/sidekiq.pid' | |
desc "Sidekiq stop" | |
task :stop do | |
puts "#### Trying to stop Sidekiq Now !!! ####" | |
if File.exist?(sidekiq_pid_file) | |
puts "Stopping sidekiq now #PID-#{File.readlines(sidekiq_pid_file).first}..." |
# CONFIGURATION FOR USING SMS KANNEL WITH RAPIDSMS | |
# | |
# For any modifications to this file, see Kannel User Guide | |
# If that does not help, see Kannel web page (http://www.kannel.org) and | |
# various online help and mailing list archives | |
# | |
# Notes on those who base their configuration on this: | |
# 1) check security issues! (allowed IPs, passwords and ports) | |
# 2) groups cannot have empty rows inside them! | |
# 3) read the user guide |