Skip to content

Instantly share code, notes, and snippets.

View piyushchauhan2011's full-sized avatar
🔥
Working

Piyush Chauhan piyushchauhan2011

🔥
Working
View GitHub Profile
// Place user-specific overrides in this file, to ensure they're preserved
// when upgrading
{
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"]
}
var gulp = require('gulp');
var gutil = require('gulp-util');
var notify = require('gulp-notify');
var sass = require('gulp-ruby-sass');
var autoprefix = require('gulp-autoprefixer');
var minifyCSS = require('gulp-minify-css')
var coffee = require('gulp-coffee');
var exec = require('child_process').exec;
var sys = require('sys');
class ImageUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick
storage :file
def thumb(size)
begun_at = Time.now
size.gsub!(/#/, '!')
uploader = Class.new(self.class)
uploader.versions.clear
uploader.version_names = [size]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
</body>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<hr>
<div class="container">
<div class="row">
@piyushchauhan2011
piyushchauhan2011 / knockout.html
Last active August 29, 2015 14:05
Testing Knockout.js// source http://jsbin.com/weruw/1
<html>
<head>
<meta charset="UTF-8">
<title>Testing Knockout.js</title>
</head>
<body>
Choose a ticket class:
<select data-bind="options: tickets,
optionsCaption: 'Choose...',
optionsText: 'name',
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Lazy Load</title>
</head>
<body>
</body>
<script src="//cdnjs.cloudflare.com/ajax/libs/lazyload/2.0.3/lazyload-min.js"><\/script>
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@piyushchauhan2011
piyushchauhan2011 / .bashrc
Created October 21, 2014 16:42
My .bashrc file
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@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