Skip to content

Instantly share code, notes, and snippets.

View lvnilesh's full-sized avatar
💭
🏆 Vibranium Status Level

LV Nilesh lvnilesh

💭
🏆 Vibranium Status Level
View GitHub Profile
/*
Nice to study. Original here http://www.20thingsilearned.com/js/twentythings.min.js
*/
var TT = TT || {};
TT.PAGE_WIDTH = 800;
TT.PAGE_HEIGHT = 500;
TT.PAGE_MIN_WIDTH = 1000;
TT.PAGE_MIN_HEIGHT = 680;
TT.PAGE_MARGIN_LEFT = 32;
var BrowserDetect = {
init: function () {
this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version";
this.OS = this.searchString(this.dataOS) || "an unknown OS";
},
searchString: function (data) {
for (var i = 0; i < data.length; i++) {
var dataString = data[i].string;
var dataProp = data[i].prop;
from fabric.api import *
"""
Base configuration
"""
env.project_name = '$(project)'
env.database_password = '$(db_password)'
env.site_media_prefix = "site_media"
env.admin_media_prefix = "admin_media"
env.newsapps_media_prefix = "na_media"
@lvnilesh
lvnilesh / rbenv-install-system-wide.sh
Created November 4, 2011 05:43 — forked from hakanensari/rbenv-install-system-wide.sh
rbenv install and system wide install on Ubuntu 10.04 LTS.
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
@lvnilesh
lvnilesh / bundle exec rake db:initial_setup
Created February 26, 2012 02:05
Index name 'index___migrated_message_participant_strings_on_migrated_message_id' on table '__migr..........strings' is too long; the limit is 64 characters.
[class.thencta.com] run: cd /var/rails/canvas; export GEM_HOME=/home/nilesh/gems; RAILS_ENV=production $GEM_HOME/bin/bundle exec rake db:initial_setup
[class.thencta.com] out: WARNING: 'require 'rake/rdoctask'' is deprecated. Please use 'require 'rdoc/task' (in RDoc 2.4.2[class.thencta.com] out:
[class.thencta.com] out: at /home/nilesh/gems/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
[class.thencta.com] out: Please install RDoc 2.4.2+ to generate documentation.
[class.thencta.com] out: == InstallCustomFields: migrating ============================================
[class.thencta.com] out: -- create_table(:custom_fields, {:force=>true})
[class.thencta.com] out: -> 0.0498s
[class.thencta.com] out: -- add_index(:custom_fields, ["scoper_type", "scoper_id", "target_type", "name"], {:name=>"custom[class.thencta.com] out:
[class.thencta.com] out: -> 0.0084s
[class.thencta.com] out: -- create_table(:custom_field_values, {:force=>true})
@lvnilesh
lvnilesh / gist:3252025
Created August 3, 2012 22:09 — forked from masnick/gist:1654182
Amazon S3 bucket policy for blog.fungibleclouds.com
{
"Version": "2008-10-17",
"Id": "b2cc31d0-cc91-4285-a658-473099d2c867",
"Statement": [
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
imac:chef-repo nilesh$ knife client list
nes-validator
imac:chef-repo nilesh$ knife bootstrap 192.168.2.124 -x cloudmaster -P ncta --sudo
Bootstrapping Chef on 192.168.2.124
192.168.2.124 knife sudo password:
Enter your password:
192.168.2.124
192.168.2.124 --2012-08-05 10:28:46-- http://opscode.com/chef/install.sh
192.168.2.124
@lvnilesh
lvnilesh / config.log
Created August 11, 2012 03:40
brew install libxmlsec1 fails on Mountain Lion
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by xmlsec1 configure 1.2.18, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/libxmlsec1/1.2.18 --with-libxml=/usr/local/Cellar/libxml2/2.8.0 --disable-apps-crypto-dl
## --------- ##
## Platform. ##
@lvnilesh
lvnilesh / install log
Created August 11, 2012 03:42
brew install -v libxmlsec1
imac% brew install -v libxmlsec1
==> Downloading http://www.aleksey.com/xmlsec/download/xmlsec1-1.2.18.tar.gz
Already downloaded: /Library/Caches/Homebrew/libxmlsec1-1.2.18.tar.gz
/usr/bin/tar xf /Library/Caches/Homebrew/libxmlsec1-1.2.18.tar.gz
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file src/dl.c
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/libxmlsec1/1.2.18 --with-libxml=/usr/local/Cellar/libxml2/2.8.0 --disable-apps-crypto-dl
./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/libxmlsec1/1.2.18 --with-libxml=/usr/local/Cellar/libxml2/2.8.0 --disable-apps-crypto-dl
checking build system type... x86_64-apple-darwin12.0.0
@lvnilesh
lvnilesh / uhuru
Created August 12, 2012 19:25
Trying out uhurucloud by pointing it to my Octopress blog http://blog.fungibleclouds.com
Last login: Sun Aug 12 10:22:20 on ttys002
imac [nilesh] /Users/nilesh>cd rails_projects/uhuru
imac [nilesh] /Users/nilesh/rails_projects/uhuru>ls
imac [nilesh] /Users/nilesh/rails_projects/uhuru>ls -l
imac [nilesh] /Users/nilesh/rails_projects/uhuru>vmcu
Usage: vmcu [options] command [<args>] [command_options]
Try 'vmcu help [command]' or 'vmcu help options' for more information.
imac [nilesh] /Users/nilesh/rails_projects/uhuru>vmcu target services.uhurucloud.com