Skip to content

Instantly share code, notes, and snippets.

View websiddu's full-sized avatar
😎
Cool

Siddhartha websiddu

😎
Cool
View GitHub Profile
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
countSheet(document.styleSheets[i]);
}
function countSheet(sheet) {
@websiddu
websiddu / deploy.rb
Last active August 29, 2015 14:21 — forked from ryanray/deploy.rb
# config/deploy.rb
# probably a lot of ways to improve this...
set :application, 'my_app'
set :repo_url, 'git@github.com:USERNAME/my_app.git'
# should set up a deploy user
set :user, 'deploy'
set :deploy_to, '/var/www/my_app'
set :scm, :git
"use strict;"
/*
Example script for the passport-uwshib module
This should be run on a server that will be or
already has been registered with the UW Shibboleth
Identity Provider (IdP).
*/
{
"name": "test-uwshib",
"version": "0.0.1",
"dependencies": {
"passport-uwshib": "*",
"body-parser": "*",
"chalk": "*",
"cookie-parser": "*",
"express": "*",
@websiddu
websiddu / main.py
Last active December 10, 2015 07:36
import webapp2
import jinja2
import os
import logging
import datetime
from google.appengine.ext import db
from google.appengine.ext.db import Key
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Install a 3rd party moudle
sudo pip install --ignore-installed --install-option="--prefix=/Users/sid/Desktop/Apps/youtube/lib" google-api-python-client
@websiddu
websiddu / 0_reuse_code.js
Created September 29, 2013 03:35
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
@websiddu
websiddu / INTERNET_ERROR_CODES
Last active December 29, 2015 11:09
INTERNET ERROR CODES
INTERNET ERROR CODES
1xx Informational
----------------
100 Continue
101 Switching Protocols
2xx Success
----------------
200 OK
import { Component, OnInit } from '@angular/core';
import { ApiService } from '../shared/services/api/api.service';
import { DocframeComponent } from '../shared/docframe/docframe.component';
import {DomSanitizationService, SafeResourceUrl} from '@angular/platform-browser';
@Component({
moduleId: module.id,
selector: 'app-doc',
templateUrl: 'doc.component.html',
styleUrls: ['doc.component.css'],