Skip to content

Instantly share code, notes, and snippets.

@gangsta
gangsta / SSL.md
Last active March 9, 2025 17:07
How to Setting Up a Comodo SSL Cert

How to Setting Up a Comodo SSL Cert

  • I advice you to buy SSL Certs from officially Comodo only , or some SSL reseller whose you trust.

These are the steps I went through to set up an SSL cert. Purchase the cert

Prior to purchasing a cert, you need to generate a private key, and a CSR file (Certificate Signing Request). You’ll be asked for the content of the CSR file when ordering the certificate:

openssl req -new -newkey rsa:2048 -nodes -keyout example_com.key -out example_com.csr
@tmp2000
tmp2000 / opendkim_multi_config.sh
Created December 13, 2016 19:25 — forked from stevejenkins/opendkim_multi_config.sh
Script submitted by Almir Duarte Jr. for automating OpenDKIM key generation and configuration for multiple domains.
#!/bin/bash
# USAGE
# Install opendkim
# List all your domains in file /etc/opendkim/TrustedHosts, one per line
CHOWN="$(which chown)"
MKDIR="$(which mkdir)"
REMOVE="$(which rm)"
ECHO="$(which echo)"
COPY="$(which cp)"
@rmehta
rmehta / erpnext_magento.php
Last active April 24, 2024 06:57
Sample ERPNext Magento Connector
<?php
// contributed by supplify.com
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once '../curl/Zebra_cURL.php';
require_once '../app/Mage.php';
Mage::app();
class action extends Zebra_cURL{
@hawkup
hawkup / Install Play Framework on Ubuntu 14.04.md
Last active May 15, 2019 16:20
Install Play Framework on Ubuntu 14.04

Install Play Framework on Ubuntu 14.04

  1. download file from https://www.typesafe.com/activator/download
  2. move unzipped directory to /usr/local/share
  3. export
export ACTIVATOR_HOME=/usr/local/share/activator-dist-1.3.6
export PATH=$PATH:$ACTIVATOR_HOME/bin
  1. create Play app
@danielmcclure
danielmcclure / facebook-wca-standard-events.html
Last active October 14, 2024 07:21
Sample Facebook Standard Events for New Facebook WCA (Website Custom Audience) Pixel
<!-- Facebook Custom Audience Pixel Code - Placed on Every Page of Site -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','//connect.facebook.net/en_US/fbevents.js');
fbq('init', '{{facebook pixel}}');
fbq('track', 'PageView');
</script>
@peterjaap
peterjaap / Observer.php
Created June 2, 2015 10:34
Fixed Orchid_CouponFix_Model_Observer for Magento 1.7+
<?php
class Orchid_CouponFix_Model_Observer
{
public function cancel($observer)
{
$resource = Mage::getModel('core/resource');
$db = $resource->getConnection('core_write');
$event = $observer->getEvent();
$order = $event->getPayment()->getOrder();
if ($order->canCancel()) {

Step by step to install Scala + Play Framework in Ubuntu 14.04 with Activator.

Install Scala

sudo apt-get remove scala-library scala
wget http://www.scala-lang.org/files/archive/scala-2.11.6.deb
sudo dpkg -i scala-2.11.6.deb
sudo apt-get update
sudo apt-get install scala
@StefanWallin
StefanWallin / README.md
Last active January 15, 2022 06:22 — forked from konklone/ssl.rules
nginx ssl config with multiple SNI vhosts and A+ SSL Labs score as of 2014-11-05

Configuring nginx for SSL SNI vhosts

Gotchas

Remarks

  • My version of konklones SSL config does not have SPDY support(my nginx+openssl does not support it)
  • You need a default ssl server (example.org-default.conf).
  • Some SSL-options have to be unique across your instance, so it's easier to have them in a common file(ssl.conf).
@SchumacherFM
SchumacherFM / CatalogDeleteNull.sql
Last active January 15, 2023 15:41
Magento: Remove all NULL values from catalog_*_entity_* tables
DELETE FROM catalog_category_entity_datetime WHERE `value` IS NULL;
DELETE FROM catalog_category_entity_decimal WHERE `value` IS NULL;
DELETE FROM catalog_category_entity_int WHERE `value` IS NULL;
DELETE FROM catalog_category_entity_text WHERE `value` IS NULL;
DELETE FROM catalog_category_entity_varchar WHERE `value` IS NULL;
DELETE FROM catalog_product_entity_datetime WHERE `value` IS NULL;
DELETE FROM catalog_product_entity_decimal WHERE `value` IS NULL;
DELETE FROM catalog_product_entity_gallery WHERE `value` IS NULL;
DELETE FROM catalog_product_entity_group_price WHERE `value` IS NULL;