Skip to content

Instantly share code, notes, and snippets.

@stnight
stnight / email.php
Created January 24, 2016 23:20
This will be added under config directory
<?php
$config['protocol'] = "smtp";
$config['smtp_crypto'] = 'ssl';
$config['smtp_host'] = "smtp.gmail.com";
$config['smtp_port'] = 465;
$config['smtp_user'] = "cictpracticum2015@gmail.com";
$config['smtp_pass'] = "bpsucict2016";
$config['mailtype'] = "text";
$config['charset'] = "iso-8859-1";
$config['send_multipart'] = FALSE;
@stnight
stnight / Sender.php
Created January 24, 2016 23:23
This is a controller, please follow this pattern, it always work for me
<?php
class Sender extends CI_Controller {
public function __construct() // to remember use public
{
parent::__construct();
$this->load->helper('url');
}
public function home() {
$this->load->library('email'); // load email library

Installation of MongoDB on Fedora

Create a yum repo file

$ vim /etc/yum.repos.d/mongodb.repo

Insert the following as value

(function () {
askQuestion()
})();
var page = e.detail.page;
$$(page.container).find("script").each(function(el){
if ($(this).attr('src')){
jQuery.getScript($(this).attr('src'));
} else {
eval($(this).text());
}
})
<html>
<head>
<meta name="robots" content="noindex" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="" />
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="quiz.css">
<title>Cryptonite</title>
</head>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Add To Cart</title>
</head>
<body>
<!-- for item 1 -->
<div>
(() => {
// all add to cart button
let allAddToCartButtons = document.querySelectorAll(".addToCartButton");
let allIncreaseQtyButtons = document.querySelectorAll(".increaseQuantityButton");
let allDecreaseQtyButtons = document.querySelectorAll(".decreaseQuantityButton");
// register events on each
// for add to cart
for (let addToCartButton of allAddToCartButtons) {
addToCartButton.addEventListener('click', () => {