Thursday, December 19, 2013

How to Make 5 Easy Rum Cocktails

Saturday, December 14, 2013

current URL in Magento

<?php

$currentUrl = $this->helper('core/url')->getCurrentUrl();

?>



<?php
$current_page = '';
/*
* CMS page
* get the page identifier
*/
if(Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms'):
$current_page = Mage::getSingleton('cms/page')->getIdentifier();
endif;
/*
* If not CMS page, 
* get the route name
*/
if(empty($current_page)):
$current_page = Mage::app()->getFrontController()->getRequest()->getRouteName();
endif;
/*
* catalog page
* get the category path :)
*/
if($current_page == 'catalog'):
$current_page = 'categorypath-' . preg_replace('#[^a-z0-9]+#', '-', strtolower(Mage::registry('current_category')->getUrlPath()));
endif;
?>

Thief

http://www.thiefgame.com/


Noise Texture Generator

http://www.noisetexturegenerator.com/


Stripe Mania

http://www.stripemania.com/



Key & Peele: Obama Shutdown

Bitcoin - Overview

Thursday, November 28, 2013

Friday, November 22, 2013

Css golden text trick






------------------
html
-------------------
<div>
    <span>GOLDEN TEXT</span>
</div>



--------------------
css
-----------------------
body {
margin: 0;
padding: 0;
}

div {
    background: black;
padding: 20px;
}

span {
    color: white;
    text-shadow: 3px 3px 8px #BF7F00, -3px -3px 8px #BF7F00;
    font-size: 80px;
    font-family: Arial;
}


Wednesday, November 20, 2013

Common Unicode Icons

a[href^="mailto:"]:before { content: "\2709"; }
.phone:before             { content: "\2706"; }
.important:before         { content: "\27BD"; }
blockquote:before         { content: "\275D"; }
blockquote:after          { content: "\275E"; }
.alert:before             { content: "\26A0"; }


<p>
  <a href="mailto:chriscoyier@gmail.com">
    chriscoyier@gmail.com
  </a>
</p>

<p class="phone">
    555-555-5555
</p>

<p class="important">
  REMEMBER: drink slushies too fast.
</p>

<blockquote>
   Designers tend to whisper, ad agencies tend to shout.
</blockquote>

<p class="alert">
   Stranger Danger!
<p>


Source: css-tricks.com

Thursday, November 7, 2013

Intel Next Unit of Computing - NUC

http://www.youtube.com/v/TKsYyXa_03o?version=3&autohide=1&showinfo=1&autohide=1&feature=share&autoplay=1&attribution_tag=g_o6IUyl4JWwt6ivLy9y3w

Magento: Change checkout successful page to from 2-col-right to 1 column layout

copy the checkout.xml inside your your theme folder

in the app ->  design -> base -> default -> layout -> checkout.xml


Change the template line#420 to 1column.php

Wednesday, November 6, 2013

alertify.js nice alerts and messages

http://fabien-d.github.io/alertify.js/

its simple to use in yii and magento or any other website

include alertify.min.js and the css files, you are done







Yii set the default sort order

class MyModel extends CActiveRecord {
...

public function search(

          return new CActiveDataProvider($this, array(
              'criteria' => $criteria,
              'pagination' => array(
                  'pageSize' => 100,
              ),
              'sort' => array(
                  'defaultOrder' => 'firstname, lastname DESC',
              )
          ));

Thursday, July 18, 2013

SageOne

there's a cool accounting package from Sage-One

signed up  for a 15 day trial

looks good, very user friendly, nice gui :)

 

just started using it


i sharing gdoc with screenshots (click the link below)

SageOne Screenshots








Sunday, June 9, 2013

import large csv files intp mysql

you can edit the php.ini

or

i am using XAMPP 1.8.1 on Windows 7 Ultimate Edition

my xampp directory >>> D:\xampp
and database >>> sampledb

copy the data file inside D:\xampp\mysql\data\sampledb

CREATE TABLE IF NOT EXISTS `table2` (
  `FirstName` text,
  `LastName` text,
  `Company` text,
  `Address` text,
  `City` text,
  `County` text,
  `State` text,
  `ZIP` text,
  `Phone` text,
  `Fax` text,
  `Email` text,
  `Web` text
)

* this is not may not be the ideal way create table
   really wanted to create the table in with the loading of data and add the auto-incremental field

my data file is around 22MB and 349996 rows

LOAD DATA INFILE 'data.txt' INTO TABLE table2
  FIELDS TERMINATED BY ',' ENCLOSED BY '"'
  LINES TERMINATED BY '\r\n'
  IGNORE 1 LINES;


Sunday, May 19, 2013

Custom Function in Excel to get the url of the cell





i am working on small excel project to get the url

i copy the links from the webpage straight into excel
well the url or hyperlink its there but the problem is...
i need to insert them into mysql database and...
there are 10,000 records.


































i am still using office 2007 don't whether the function is available in the newer versions..


so here are the steps for ppl using excel 2007..........

open a macro enabled workbook or save it later as .xlsm


Alt + F11 open the visual basic editor

insert a new module

























paste the following code (highlighted in yellow)


Function GETURL(HyperlinkCell As Range)

 GETURL = HyperlinkCell.Hyperlinks(1).Address

End Function



















save and close the editor

now go back to the sheet view


Friday, May 3, 2013

mySQL mulitple table update

UPDATE config, tmp_config
SET
 config.new1 = tmp_config.new1,
 config.new2 = tmp_config.new2
WHERE tmp_config.tmp_id = config.id

UPDATE account, vtiger_accountshipads 
SET account.acc_shipping_address=vtiger_accountshipads.ship_street, account.acc_shipping_po_box=vtiger_accountshipads.ship_pobox, account.acc_shipping_city=vtiger_accountshipads.ship_city , account.acc_shipping_state=vtiger_accountshipads.ship_state, account.acc_shipping_postal_code=vtiger_accountshipads.ship_code , account.acc_shipping_country=vtiger_accountshipads.ship_country
WHERE vtiger_accountshipads.id=account.acc_id

Thursday, May 2, 2013

Richard Stallman Talks About Ubuntu


Richard Stallman Talks About Ubuntu & its privacy invasing (according to EFF and FSF) Features. In order to access the video (watch or download) usining free software. Please read the article on Muktware.click here

Monday, April 1, 2013

hide login username from the login screen in Fedora 18

I using Fedora 18 - Gnome 3.6.2

I have ten user accounts (created for testing purposes) i dont want the username listed or shown to anyone trying to login to my laptop.

i came across a solution updating gconf database

go to


 touch or create a file called 01.mysettings






vi 01.mysettings







update the dconf database




Wednesday, January 9, 2013

Pear Linux

Pear Linux is another flavour of linux based on ubuntu. its a desktop distribution and current version is 6
File Size 822MB.

review
http://www.linuxbsdos.com/2012/11/01/pear-linux-6-review/ [Review 2012 November]

official websites
http://pearlinux.fr/
http://pear.prophecy.li/














Fetchmail



Fetchmail is an open source software utility for POSIX-compliant operating systems which is used to retrieve e-mail from a remote POP3, IMAP, ETRN or ODMR mail server to the user's local system. 

It was developed from the popclient program, written by Carl Harris

Official Site www.fetchmail.info


to install fetchmail you need root privileges

[root@localhost ~]# yum info fetchmail

[root@localhost ~]# yum install fetchmail



Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package fetchmail.i686 0:6.3.22-1.fc16 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

Package       Arch          Version             Repository                         Size
Installing:
 fetchmail      i686          6.3.22-1.fc16     updates                           531 k

Transaction Summary
=================================================================================
Install       1 Package

Total download size: 531 k
Installed size: 2.1 M
Is this ok [y/N]: y
Downloading Packages:
fetchmail-6.3.22-1.fc16.i686.rpm                                                                                              | 531 kB     00:08     
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : fetchmail-6.3.22-1.fc16.i686                                                                                                      1/1 

Installed:
  fetchmail.i686 0:6.3.22-1.fc16                                                                                                                     

Complete!



now in you home (cd ~) directory eg:- /home/jerome

touch .fetchmailrc

add the following lines....


poll imap.gmail.com protocol IMAP 
   user "xxxxxxx@gmail.com" is adriaan here
   password 'mysecretpassword'
   folder 'BUP'
   fetchlimit 1
   keep
   ssl


fetchmail -v



About

Blogger templates