Skip to content

Instantly share code, notes, and snippets.

@pratik60
pratik60 / SassMeister-input.scss
Created May 15, 2014 19:58
Generated by SassMeister.com.
// ----
// Sass (v3.2.19)
// Compass (v0.12.6)
// Breakpoint (v2.0.7)
// Susy (v1.0.9)
// ----
@import "breakpoint";
@import "susy";
@import "compass";
<section>
<div data-ng-show="global.authenticated" class="home-timeline scroll-box">
<!-- <div data-ng-show="global.authenticated" class="home-timeline scroll-box" dr-window-infinite-scroll="onScroll()"> -->
<div class="posts-listing">
<div class="block-title">
<span class="line-holder"></span>
<span class="recent-happening-title">Recent Happenings </span>
<span class="title-drop-button">All Posts</span>
</div>
<div infinite-scroll='nextPage()' infinite-scroll-disabled='busy' infinite-scroll-distance='0'>
@pratik60
pratik60 / user migrate
Created May 2, 2014 08:20
user migrate
var user_migration_error = [];
function user_migration_save(user) {
user.save(function(err) {
if (err) {
console.log(err);
console.log(user.email);
user_migration_error.push(user);
}
else {
@pratik60
pratik60 / mysql
Created April 19, 2014 06:30
mysql settings
# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /Applications/MAMP/db/mysql) or
@pratik60
pratik60 / 0_reuse_code.js
Created January 28, 2014 22:51
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
@pratik60
pratik60 / Views
Last active December 31, 2015 01:09
Views
$view = new view();
$view->name = 'user_byline';
$view->description = 'Allocating byline to author, during node view';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'User Byline';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@pratik60
pratik60 / panels
Created December 11, 2013 15:12
Export
$handler = new stdClass();
$handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
$handler->api_version = 1;
$handler->name = 'node_view_panel_context';
$handler->task = 'node_view';
$handler->subtask = '';
$handler->handler = 'panel_context';
$handler->weight = 0;
$handler->conf = array(
'title' => 'Article',
@pratik60
pratik60 / fivestar template
Created November 10, 2013 01:17
Fivestar summary
<?php
function insight_client_fivestar_summary($variables) {
$microdata = $variables['microdata'];
extract($variables, EXTR_SKIP);
$output = '';
$div_class = '';
$average_rating_microdata = '';
if (isset($user_rating)) {
$div_class = isset($votes) ? 'user-count' : 'user';
$user_stars = round(($user_rating * $stars) / 100, 1);
@pratik60
pratik60 / Git Public Commands
Created November 10, 2013 01:09
Git Public Commands
git log --follow -p file
@pratik60
pratik60 / .inputrc
Created October 18, 2013 07:56
inputrc
"\e[A": history-search-backward
"\e[B": history-search-forward
"\e[C": forward-char
"\e[D": backward-char