Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| /** | |
| * This client extends the ususal SoapClient to handle mtom encoding. Due | |
| * to mtom encoding soap body has test apart from valid xml. This extension | |
| * remove the text and just keeps the response xml. | |
| */ | |
| class MTOMSoapClient extends SoapClient { | |
| public function __doRequest($request, $location, $action, $version, $one_way = 0) { | |
| $response = parent::__doRequest($request, $location, $action, $version, $one_way); | |
| //if resposnse content type is mtom strip away everything but the xml. |
| /* | |
| * jQuery.ajaxQueue - A queue for ajax requests | |
| * | |
| * (c) 2011 Corey Frang | |
| * Dual licensed under the MIT and GPL licenses. | |
| * | |
| * Requires jQuery 1.5+ | |
| */ | |
| (function(a){var b=a({});a.ajaxQueue=function(c){function g(b){d=a.ajax(c).then(b,b).done(e.resolve).fail(e.reject)}var d,e=a.Deferred(),f=e.promise();b.queue(g),f.abort=function(h){if(d)return d.abort(h);var i=b.queue(),j=a.inArray(g,i);j>-1&&i.splice(j,1),e.rejectWith(c.context||c,[f,h,""]);return f};return f}})(jQuery) |
| For collection view | |
| initialize: -> | |
| console.debug 'CollectionView#initialize' | |
| super({render:false, renderItems:false}) | |
| render: -> | |
| super | |
| @renderAllItems() | |
| perl -pi -w -e 's/SEARCH_FOR/REPLACE_WITH/g;' *.extension |
| import sbt._ | |
| import Defaults._ | |
| resolvers += "Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/" | |
| libraryDependencies += sbtPluginExtra( | |
| m = "com.github.mpeltonen" % "sbt-idea" % "1.3.0-SNAPSHOT", // Plugin module name and version | |
| sbtV = "0.12", // SBT version | |
| scalaV = "2.9.2" // Scala version compiled the plugin | |
| ) |
| if [[ $- != *i* ]] ; then | |
| # Shell is non-interactive. Be done now! | |
| return | |
| fi | |
| #enable bash completion | |
| [ -f /etc/profile.d/bash-completion ] && source /etc/profile.d/bash-completion | |
| # make less more friendly for non-text input files, see lesspipe(1) | |
| [ -x /usr/bin/lesspipe ] && eval "$(lesspipe)" |
| import os | |
| import random | |
| from scrapy.conf import settings | |
| class RandomUserAgentMiddleware(object): | |
| def process_request(self, request, spider): | |
| ua = random.choice(settings.get('USER_AGENT_LIST')) | |
| if ua: | |
| request.headers.setdefault('User-Agent', ua) | |
| class ProxyMiddleware(object): |
| # More comprehensive list can be found at | |
| # http://techpatterns.com/forums/about304.html | |
| USER_AGENT_LIST = [ | |
| 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.36 Safari/535.7', | |
| 'Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:16.0) Gecko/16.0 Firefox/16.0', | |
| 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.55.3 (KHTML, like Gecko) Version/5.1.3 Safari/534.53.10' | |
| ] | |
| DOWNLOADER_MIDDLEWARES = { | |
| 'myproject.middlewares.RandomUserAgentMiddleware': 400, | |
| 'myproject.middlewares.ProxyMiddleware': 410, |
| package com.mojolly.backchat | |
| package redis | |
| package resque | |
| import com.mojolly.backchat.redis.resque.Resque.{ResqueWorkerActor} | |
| import net.liftweb.json._ | |
| import JsonAST._ | |
| import JsonDSL._ | |
| import java.net.InetAddress | |
| import com.redis.ds.{ RedisDeque, RedisDequeClient } |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.