Skip to content

Instantly share code, notes, and snippets.

View piyushchauhan2011's full-sized avatar
🔥
Working

Piyush Chauhan piyushchauhan2011

🔥
Working
View GitHub Profile
@julianocomg
julianocomg / AffixWrapper.jsx
Last active May 17, 2024 04:24
A simple affix React component.
/**
* @author Juliano Castilho <[email protected]>
*/
var React = require('react');
var AffixWrapper = React.createClass({
/**
* @type {Object}
*/
propTypes: {
@sebz
sebz / grunt-hugo-lunrjs.md
Last active September 5, 2025 00:21
hugo + gruntjs + lunrjs = <3 search
@obfusk
obfusk / break.py
Last active July 11, 2025 11:12
python "breakpoint" (more or less equivalent to ruby's binding.pry); for a proper debugger, use https://docs.python.org/3/library/pdb.html
import code; code.interact(local=dict(globals(), **locals()))
@sebmarkbage
sebmarkbage / Enhance.js
Last active June 19, 2025 19:41
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@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">
.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;
// Routing setup
.config(function ($routeProvider) {
$routeProvider
.when('/home', {
controller: 'homeCtrl',
templateUrl: 'home.tpl.html'
}).when('/users', {
controller: 'usersCtrl',
controllerAs: 'vm',
templateUrl: 'users.tpl.html',
@honkskillet
honkskillet / byte-sizetuts.md
Last active August 22, 2024 14:19
A series of golang tutorials with youtube videos.
@ericelliott
ericelliott / essential-javascript-links.md
Last active June 14, 2025 18:43
Essential JavaScript Links
@piyushchauhan2011
piyushchauhan2011 / .vimrc
Created October 21, 2014 16:43
My .vimrc file
execute pathogen#infect()
syntax on
filetype plugin indent on
call pathogen#helptags()
filetype plugin on
set omnifunc=syntaxcomplete#Complete
colorscheme solarized
" colorscheme pencil
set background=dark