Skip to content

Instantly share code, notes, and snippets.

View arifmahmudrana's full-sized avatar

Arif Mahmud Rana arifmahmudrana

View GitHub Profile
@arifmahmudrana
arifmahmudrana / mootools-with-animate-dot-css.html
Created December 17, 2014 17:22
How to animate HTML5 elements with animate.css and MooTools
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>MooTools with animate.css</title>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/animate.css/3.2.0/animate.min.css" />
</head>
<body>
<span id="animationSandbox" style="display: block;"><h1 class="site__title mega">Animate.css</h1></span>
<div class="wrap">
@arifmahmudrana
arifmahmudrana / Some important links
Created September 19, 2013 09:27
In this file I will list some important links that will be useful for developer
@arifmahmudrana
arifmahmudrana / changepermission
Created September 11, 2013 07:06
In social engine some time we need to change permission of groups.
/*
*
* Put this into any test controller and test action
*
*/
$auth = Engine_Api::_()->authorization()->context;//Get Allow DB Table
foreach (Engine_Api::_()->getDbtable('groups', 'group')->fetchAll() as $group) ://Fetch All Groups
$auth->setAllowed($group, 'registered', 'comment');//This set disallow registered members to post to group
$auth->setAllowed($group, 'registered', 'photo');//This set disallow registered members to create any event
@arifmahmudrana
arifmahmudrana / index.php
Created September 9, 2013 10:34
Create a file on the fly using php output buffering. Sometime we need to create file on the fly this serves the purpose.
<?php
/*
* @source http://stackoverflow.com/questions/15769732/write-to-php-output-buffer-and-then-download-csv-from-buffer
*/
$basic_info = fopen("php://output", 'w'); //Open output buffer to write
$content = file_get_contents(__FILE__); //Read the current file
fwrite($basic_info, $content); //Write to output buffer
fclose($basic_info); // Close the context
header("Content-disposition: attachment; filename=index.php");