Skip to content

Instantly share code, notes, and snippets.

View pyadav's full-sized avatar
🐢
learning new stuff

Praveen Yadav pyadav

🐢
learning new stuff
View GitHub Profile
@pyadav
pyadav / Contract Killer 3.md
Created December 8, 2016 04:48
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@pyadav
pyadav / grunt-hugo-lunrjs.md
Created December 7, 2016 18:49 — forked from sebz/grunt-hugo-lunrjs.md
hugo + gruntjs + lunrjs = <3 search
@pyadav
pyadav / webCrawler.py
Created November 22, 2016 16:17 — forked from helanzhu2020/webCrawler.py
Python: A simplified Web Crawler using BFS
import Queue
initial_page = "http://www.initial_page.com"
url_queue = Queue.Queue()
seen = set()
seen.insert(initial_page)
url_queue.put(initial_page)
""" A web photo, picture grabber """
import sys
import urllib
import urllib2
from HTMLParser import HTMLParser
import re
'''
The WretchWebParser is used to parse the content HTML of wretch.cc
'''
@pyadav
pyadav / WebCrawlerBFS.java
Last active November 22, 2016 16:06 — forked from sujathakvr/WebCrawlerBFS.java
Web Crawler Breadth First Search
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URI;
machine:
timezone: Asia/Tokyo
xcode:
version: 7.3
environment:
XCODE_SCHEME: ***
XCODE_WORKSPACE: ***.xcworkspace
GYM_CODE_SIGNING_IDENTITY: 'iPhone Distribution: ***. (***)'
dependencies:
cache_directories:
@pyadav
pyadav / authInterceptor.js
Created September 8, 2016 08:22 — forked from bettysteger/authInterceptor.js
Set specific http headers on every http request from cookies (angular)
'use strict';
/**
* Authentication with token and email for every server request. (Sets HTTP headers)
*
* This interceptor shows the error from the server (i18n key).
* Also sets global error variable if the request fails and redirects the user to '/' when he is not authorized.
* @see http://engineering.talis.com/articles/client-side-error-logging/
*/
app.factory('authInterceptor', function ($rootScope, $q, $cookies, $location, $timeout) {
@pyadav
pyadav / Child.js
Created August 25, 2016 18:11 — forked from eyesofkids/Child.js
Simple React Lifecycle methods test
import React from 'react'
var Child = React.createClass({
getInitialState: function(){
console.log('Child getInitialState');
return { value: 'start'}
},
getDefaultProps: function(){
console.log('Child getDefaultProps');
@pyadav
pyadav / install_simplecv.sh
Created August 18, 2016 10:29 — forked from chintak/install_simplecv.sh
Install SimpleCV/OpenCV in a Virtual Environment on Mac OSX
# First install homebrew
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
# Choose the name of the virtualenv as simplecv
virtualenv simplecv --no-site-packages
source simplecv/bin/activate
# This activates the virtualenv; your command prompt should change from `$` to `(simplecv)$`
# Next the dependencies
sudo easy_install pip # Can be ignored, if pip already present
@pyadav
pyadav / MainActivity.java
Created August 8, 2016 04:51 — forked from frogermcs/MainActivity.java
FlatBuffs source files
public class MainActivity extends AppCompatActivity {
@Bind(R.id.tvFlat)
TextView tvFlat;
@Bind(R.id.tvJson)
TextView tvJson;
private RawDataReader rawDataReader;
private ReposListJson reposListJson;