Skip to content

Instantly share code, notes, and snippets.

View piyushchauhan2011's full-sized avatar
🔥
Working

Piyush Chauhan piyushchauhan2011

🔥
Working
View GitHub Profile
<?php
require_once __DIR__ . 'path/to/src/Verraes/Lambdalicious/load.php';
assert(
isatom(@my_atom)
);
atom(@my_atom);
assert(
isatom(my_atom)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ansi-color-names-vector ["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"])
'(cua-mode t nil (cua-base))
;;'(custom-enabled-themes (quote (wheatgrass)))
'(scroll-bar-mode (quote right)))
(custom-set-faces
// Routing setup
.config(function ($routeProvider) {
$routeProvider
.when('/home', {
controller: 'homeCtrl',
templateUrl: 'home.tpl.html'
}).when('/users', {
controller: 'usersCtrl',
controllerAs: 'vm',
templateUrl: 'users.tpl.html',
.factory("injectCSS", ['$q', '$http', 'MeasurementsService', function($q, $http, MeasurementsService){
var injectCSS = {};
var createLink = function(id, url) {
var link = document.createElement('link');
link.id = id;
link.rel = "stylesheet";
link.type = "text/css";
link.href = url;
return link;
@piyushchauhan2011
piyushchauhan2011 / question1_equityzen.html
Created February 11, 2015 22:04
Question 1 of EquityZen Test
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
<title>Question 1 - EquityZen</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
@piyushchauhan2011
piyushchauhan2011 / subl-docit-settings
Last active November 4, 2015 21:45
Sublime Docit settings
{
"theme": "Soda Dark 3.sublime-theme",
"color_scheme": "Packages/User/SublimeLinter/Tomorrow-Night-Eighties (SL).tmTheme",
}
@piyushchauhan2011
piyushchauhan2011 / react-native-sidemenu-shadow.js
Created July 22, 2015 13:28
React Native SideMenu Shadow Code to Reference - Copied from rnplay written by some smart guy.
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
var React = require('react-native');
var SideMenu = require('react-native-side-menu');
var window = require('Dimensions').get('window');
@piyushchauhan2011
piyushchauhan2011 / Angular-outsideEvents.md
Last active August 29, 2015 14:25 — forked from sudodoki/Angular-outsideEvents.md
jQuery outside events wrapper for Angular JS

jQuery outside events wrapper for Angular js.

In case you are willing to use jquery outside events plugin by @cowboy with Angular JS, and don't want to get your hands dirty, try this wrapper.
It defines oc-clickoutside, oc-dblclickoutside, oc-mouseoveroustide, oc-focusoutside directives you can use in your code.
In order to use with amd, don't forget to set path for outsideEvents.js and its dependency jQuery.
use just like you

 <popup oc-clickoutside="hidePopup()">Your awesome popup content.</popup>

In case you don't need amd, just strip out the define(['angular', 'outsideEvents'],function(angular){...}) part. Don't forget to load module while initializing your own.

@piyushchauhan2011
piyushchauhan2011 / AffixWrapper.jsx
Last active August 29, 2015 14:26 — forked from jucastilhoduarte/AffixWrapper.jsx
A simple affix React component.
/**
* @author Juliano Castilho <julianocomg@gmail.com>
*/
var React = require('react');
var joinClasses = require('react/lib/joinClasses');
var AffixWrapper = React.createClass({
/**
* @type {Object}
*/
@piyushchauhan2011
piyushchauhan2011 / infinitescroll.js
Last active August 29, 2015 14:27 — forked from littleiffel/infinitescroll.js
My directive for infinite scroll
app.directive('infiniteScroll', [
'$rootScope', '$window', '$timeout', function($rootScope, $window, $timeout) {
return {
link: function(scope, elem, attrs) {
var checkWhenEnabled, handler, scrollDistance, scrollEnabled;
$window = angular.element($window);
elem.css('overflow-y', 'scroll');
elem.css('overflow-x', 'hidden');
elem.css('height', 'inherit');
scrollDistance = 0;