пятница, 16 октября 2015 г.

Google Calendar event buttons — Mobile version

I've been doing some research on this myself and I've come close, but I'm not 100% there yet. Here's a sample URL of a mobile "share event" link:

http://www.google.com/calendar/gp#~calendar:view=e&bm=1&action=TEMPLATE&text=Halloween+Party+2011&dates=20111101/20111202&details=Description&location=Millennial+Media&trp=false

It opens up the mobile version of Google Calendar and pre-populates it with details about the event your sharing.

The only problem I've encountered is when you're not already logged into Google Calendar. It takes you to the log in page, which is fine, but then after you log in it takes you to the home screen instead of the event entry page.

If you find or already found an answer to this, let me know.

source

среда, 7 октября 2015 г.

Give a folder its very own drive letter

Pretend that you have a file folder called C:\data\word_docs, that you use it constantly, and that you would like to refer to it with a shortcut of W:. Open up a command prompt window and issue the following command:

SUBST w: C:\data\word_docs

SUBST is short for substitute. (DOS commands are case-insensitive, so you could enter it as "subst" as well.) So, now, W:\intro.doc is the same thing as C:\data\word_docs\intro.doc — two different ways to refer to the same file.

source

понедельник, 5 октября 2015 г.

No Index No Robots

a2enmod header



<IfModule mod_headers.c>

Header set X-Robots-Tag: "noindex, nofollow, noarchive, nosnippet, noimageindex"

</IfModule>
++++
<<<<

https://www.digitalocean.com/community/tutorials/how-to-set-up-password-authentication-with-apache-on-ubuntu-14-04


chown -R apache:apache sites/default/files
chmod -R 775 sites/default/files

воскресенье, 4 октября 2015 г.

Default

$S$Dy5ukPpN0hROOg1q0Y4X.5tK9K2ub5yaectmocvfjCL55zsE7sW/
987951

среда, 16 сентября 2015 г.

Apple Certificates to PEM

p12 => pem
openssl pkcs12 -in Certificates.p12 -out push.prod.crt.pem -nodes -clcerts

bin crt => pem
openssl x509 -inform der -in aps_production.cer -outform pem -out certificate.pem


While trying to update a certificate on a produciton enviroment I ran into the following issue, Apache only accepts certificates in PEM format, since my client provided me with his new certificate on a .cer file I had to find a way to convert it.
For x509 certificates this can be easily achieved using OpenSSL on Linux/Unix and OS X. First make sure you have OpenSSL (comes by default with OS X), open a terminal and issue the following command:
openssl x509 -inform pem -in certificate.cer -outform der -out certificate.pem
Where certificate.cer is the source certificate file you want to convert and certificate.pem is the name of the converted certificate.

The inform and outform options are reversed. The command should be:
openssl x509 -inform der -in certificate.cer -outform pem -out certificate.pem

https://github.com/richsage/RMSPushNotificationsBundle/issues/60#issuecomment-40174938
http://perrohunter.com/how-to-convert-a-cer-certificate-to-pem-on-linuxunix-and-os-x/#comment-4398

четверг, 6 августа 2015 г.

Drupal Dump Field Declaration

include_once DRUPAL_ROOT . '/includes/utility.inc';
$field_data = field_info_field('field_testimonial_portrait');
unset($field_data['id']);
pre(drupal_var_export($field_data));


$instance_data = field_info_instance('node', 'field_testimonial_portrait', 'testimonial');
unset($instance_data['id'], $instance_data['field_id']);
pre(drupal_var_export($instance_data));

Inspired by http://www.thecarneyeffect.co.uk/creating-custom-content-type-adding-fields-programmatically-drupal-7


include_once DRUPAL_ROOT . '/includes/utility.inc';
$field_data = field_info_field('field_specialty');
unset($field_data['id']);
echo "
" . (drupal_var_export($field_data)) . '
';


$instance_data = field_info_instance('node', 'field_specialty', 'doctor_cv');
unset($instance_data['id'], $instance_data['field_id']);
echo "
" . (drupal_var_export($instance_data)) . '
';

среда, 5 августа 2015 г.

Drupal Mudule Translation

  1. To generate the .pot file, install the module Translation template extractor
  2. Go to the "Extract strings" tab on the Locale administration interface, select your module and submit the form. You will get one single template file generated.
  3. Then you can translate the strings with a tool like Poedit (http://www.poedit.net).
  4. When you are done, files should be copied to a "translations" sub-folder in the module folder, so they are automatically imported by Drupal when installing your game module.

drush command to force translations loading: drush php-eval "locale_system_update(array('yourmodule_name'));drush_backend_batch_process();"