Skip to content

Instantly share code, notes, and snippets.

View shidhincr's full-sized avatar
🔥
= VS Code + VIM

Shidhin shidhincr

🔥
= VS Code + VIM
View GitHub Profile
@shidhincr
shidhincr / dabblet.css
Created December 16, 2011 05:17 — forked from anonymous/dabblet.css
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
.shidhin{
background-color:#efe;
color:#789;
width:100px;
height:30px;
}
@shidhincr
shidhincr / dabblet.css
Created March 20, 2012 07:10 — forked from JoelBesada/dabblet.css
CSS States
/* CSS States */
body {
background: url(http://dabblet.com/img/noise.png);
background-color: #F5F2F0;
font-family: Georgia, serif;
font-size: 18px;
line-height: 1.6em;
text-shadow: 0 2px 0 white;
color: #222;
}
@shidhincr
shidhincr / dateutil.js
Created September 3, 2012 14:22 — forked from remy/dateutil.js
Super simple library for date time formatting.
var dateUtil = function () {
var monthDict = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
return {
time: function (date) {
var hour = date.getHours(),
min = date.getMinutes() + "",
ampm = 'AM';
if (hour == 0) {
hour = 12;
@shidhincr
shidhincr / desc.md
Created February 23, 2014 19:19 — forked from odino/desc.md

Coding challenge: cartified!

Hey JavaScript talents, here at namshi.com, we are looking for you! Submit this coding challenge to alex.nadalin@namshi.com and we'll get back to you as soon as possible!

Your task is to implement a basic shopping cart for a website, following these basic rules:

  • the cart needs to be implemented as an AngularJS service
  • the cart should be retrieved from the localStorage, where it's stored under the key cart
  • every time an action is performed on the cart, it should be persisted on the localStorage
  • the cart should only know about item IDs and their quantity
var penthouse = require('penthouse');
var Promise = require("bluebird");
var penthouseAsync = Promise.promisify(penthouse);
gulp.task('critical', function(){
penthouseAsync({
url : 'http://daverupert.com/',
css : './stylesheets/style.css',
height: 480
}).then( function (criticalCSS){
@shidhincr
shidhincr / sauce-connect.sh
Last active January 23, 2019 10:21 — forked from geshan/sauce-connect.sh
sauce connect with verbose logging
#!/bin/bash
if [ -z "${SAUCE_USERNAME}" ] || [ -z "${SAUCE_ACCESS_KEY}" ]; then
echo "This script can't run without your Sauce credentials"
echo "Please set SAUCE_USERNAME and SAUCE_ACCESS_KEY env variables"
echo "export SAUCE_USERNAME=ur-username"
echo "export SAUCE_ACCESS_KEY=ur-access-key"
exit 1
fi
SAUCE_TMP_DIR="$(mktemp -d -t sc.XXXX)"