Skip to content

Instantly share code, notes, and snippets.

View saji89's full-sized avatar

Saji Nediyanchath saji89

View GitHub Profile
@saji89
saji89 / dabblet.css
Created January 23, 2012 09:48
Pointed Corner using css border only
/**
* Pointed Corner using css border only
*/
.test-div {
margin: 24px 100px 0;
}
.test-div .price:before {
border-right: 35px solid #25A0DA;
border-top: 24px solid transparent;
@saji89
saji89 / dabblet.css
Created January 16, 2013 12:31
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body { width: 0; margin: 5% auto; background: #212e36; }
.ixlogo {
font-size: 3em; /* <--- EDIT THIS TO RESIZE */
font-family: Arial Black, sans-serif; font-weight: 900;
@saji89
saji89 / dabblet.css
Created January 17, 2013 08:26
Logo in Css
/**
* Logo in Css
*/
body { width: 0; margin: 5% auto; background: #212e36; }
.ixlogo {
font-size: 3em; /* <--- EDIT THIS TO RESIZE */
font-family: Arial Black, sans-serif; font-weight: 900;
@saji89
saji89 / afterformreset.js
Created October 21, 2013 05:51
Calling a function after the form reset event. Courtesy: http://stackoverflow.com/a/12178710/749232 The regular reset event of a form fires as and when the reset is clicked, and we do not get the state after the form reset. For getting that state we can use this code.
$(document).ready(function() {
$("input:reset").click(function() { // apply to reset button's click event
this.form.reset(); // reset the form
// call your functions to be executed after the reset
return false; // prevent reset button from resetting again
});
});
@saji89
saji89 / Rendering Views in Zend.md
Last active December 28, 2015 23:29
Various ways to render views in Zend
  1. Partials

The Partial view helper is used to render a specified template within its own variable scope. The primary use is for reusable template fragments with which you do not need to worry about variable name clashes. Additionally, they allow you to specify partial view scripts from specific modules.

<?php // partial.phtml ?>
<ul>
    <li>From: <?php echo $this->escape($this->from) ?></li>
    <li>Subject: <?php echo $this->escape($this->subject) ?></li>
@saji89
saji89 / tips.md
Last active December 29, 2015 23:59
Some commands for the linux world

Some Linux Tips

Kill problematic application/process in Linux

If you experience a freeze in the display due to different reasons(mostly memory related), if you're able to reach to one of the virtual terminals

Ctrl+Alt+(F1/F2/F3/F4/F5/F6), you can kill the rogue app you believe to have caused the freeze. Let us assume that the rogue app is Firefox. First search for the Processid(pid) of the app, I use the following for that:

ps aux| grep 'firefox'

@saji89
saji89 / gist:7818823
Created December 6, 2013 05:00 — forked from idan/gist:3135754

Hello there! This is a sample post for gist.io, a super-lightweight writing soapbox for hackers.

Now look up. Further. Above the post title. See that grey text with the gist ID?

Now back to me. That grey text is a link! Open that sucker in a new tab to see the source for this post. Also, I'm on a horse.

This is a major heading

If you peek at it with a web inspector, you'll see that it is a second-level heading. You can use first level headings, but they'll look just like the second level ones, and the gods of the HTML5 outlining algorithm will frown upon you.

@saji89
saji89 / wotd.md
Last active January 4, 2016 21:39
Word of the Day

01/02/2014 (Alvar)

persuade (പ്രേരിപ്പിക്കുക)

  • induce (someone) to do something through reasoning or argument.

30/01/2014 (Nisanth)

deliberate ( സസൂക്ഷ്‌മം, മന:പൂര്‍വ്വമായ, കരുതിക്കൂട്ടിയുളള)

  • Done consciously and intentionally.
  • adjective : carefully thought out in advance
    • Example
  • with measured irony
@saji89
saji89 / xdg.md
Created February 6, 2014 05:15
(Re)Set the default file-browser in linux
@saji89
saji89 / 0_reuse_code.js
Created March 1, 2014 09:59
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console