Skip to content

Instantly share code, notes, and snippets.

View gobinathm's full-sized avatar
💻
I may be slow to respond.

Gobinath Mallaiyan gobinathm

💻
I may be slow to respond.
View GitHub Profile
@gobinathm
gobinathm / php-webscraping.md
Last active August 26, 2015 14:37 — forked from anchetaWern/php-webscraping.md
web scraping in php

Have you ever wanted to get a specific data from another website but there's no API available for it? That's where Web Scraping comes in, if the data is not made available by the website we can just scrape it from the website itself.

But before we dive in let us first define what web scraping is. According to Wikipedia:

{% blockquote %} Web scraping (web harvesting or web data extraction) is a computer software technique of extracting information from websites. Usually, such software programs simulate human exploration of the World Wide Web by either implementing low-level Hypertext Transfer Protocol (HTTP), or embedding a fully-fledged web browser, such as Internet Explorer or Mozilla Firefox. {% endblockquote %}

@gobinathm
gobinathm / js-ios-play-pause--fix.js
Last active August 29, 2015 14:00
Fix for those webpage that gets into trouble on ios safari due to pause / play behavior
var userAgent = window.navigator.userAgent;
if (userAgent.match(/iPad/i) || userAgent.match(/iPhone/i)) {
window.onpageshow = function(event) {
if (event.persisted) {
window.location.reload()
}
};
}
@gobinathm
gobinathm / 0_reuse_code.js
Created May 8, 2014 06:05
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
@gobinathm
gobinathm / javascript_resources.md
Created May 8, 2014 06:07 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@gobinathm
gobinathm / rails_resources.md
Created May 8, 2014 06:07 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@gobinathm
gobinathm / python_resources.md
Created May 8, 2014 06:07 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

@gobinathm
gobinathm / css_resources.md
Created May 8, 2014 06:07 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@gobinathm
gobinathm / CWE-79-apache-rule
Created May 8, 2014 09:11
Fix for CWE-79 OWASP - Cross-Site Scripting Vulnerability on apache server using .htaccess
<IfModule headers_module>
Header set X-Content-Type-Options nosniff
</IfModule>
@gobinathm
gobinathm / ubuntu-apache-conf.sh
Last active August 29, 2015 14:01
Step By Step Guide to Configure Virtual Host on an Apache in a Ubuntu Machine
#Initial Step is to install / Step Apache
sudo apt-get install apache2
#below steps are done assuming that your website will be hosted under /var/www
#Create a directory that will act as a document root for your site
sudo mkdir -p /var/www/example.dev/public_html
#Create a directory that will used for Log Storage
sudo mkdir -p /var/www/example.dev/log
@gobinathm
gobinathm / drush-command
Created May 14, 2014 11:30
Listing DRUSH command for User's Easy Reference.
#Generate one time login link.
drush uli <<some-username>>
#(Re)Set the password for the user account with the specified name.
drush user-password <<someuser>> --password="new password"