from selenium.webdriver.common.proxy import * | |
from selenium import webdriver | |
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities | |
proxy = {'address': '191.101.24.45:8085'} | |
capabilities = dict(DesiredCapabilities.CHROME) |
import requests | |
import socket | |
import socks | |
import csv | |
import sqlite3 | |
import datetime | |
from scrapy.http import HtmlResponse | |
socks.set_default_proxy(socks.SOCKS5, "proxy.torguard.io", 1090, username="", password="") |
# -*- coding: utf-8 -*- | |
import json | |
import re | |
# Import Scrapy stuff | |
import scrapy | |
import time | |
from scrapy import signals | |
from scrapy.http import HtmlResponse |
{ | |
app.beginUndoGroup("Demo Script"); | |
// Creating project | |
var currentProject = (app.project) ? app.project : app.newProject(); | |
// Creating comp | |
var compSettings = cs = [1280, 720, 1, 10, 24]; | |
var defaultCompName = "Demo" | |
var currentComp = (currentProject.activeItem) ? currentProject.activeItem : currentProject.items.addComp(defaultCompName, cs[0], cs[1], cs[2], cs[3], cs[4]); |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.
#!/usr/bin/env python | |
# coding: utf-8 | |
# You need PIL <http://www.pythonware.com/products/pil/> to run this script | |
# Download unifont.ttf from <http://unifoundry.com/unifont.html> (or use | |
# any TTF you have) | |
# Copyright 2011 Álvaro Justen [alvarojusten at gmail dot com] | |
# License: GPL <http://www.gnu.org/copyleft/gpl.html> | |
from image_utils import ImageText |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
var express = require('express'); | |
var app = express(); | |
var fs = require('fs'); | |
app.listen(3000, function() { | |
console.log("[NodeJS] Application Listening on Port 3000"); | |
}); | |
app.get('/api/play/:key', function(req, res) { | |
var key = req.params.key; |