Skip to content

Instantly share code, notes, and snippets.

View thybzi's full-sized avatar

Evgeni Dmitriev thybzi

View GitHub Profile
@kennethreitz
kennethreitz / gist:1294570
Created October 18, 2011 03:54 — forked from Miserlou/gist:1294412
Posting JSON in Python without Requests Library
1 import urllib2
2 import json
221 def basic_authorization(user, password):
222 s = user + ":" + password
223 return "Basic " + s.encode("base64").rstrip()
224
225 def submit_pull_request(user, repo):
226 auth = (settings.username, settings.password)
227 url = 'https://api.github.com/repos/' + user + '/' + repo + '/pulls'
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@MercuryRising
MercuryRising / parserComparison.py
Created November 12, 2012 19:29
Pyquery, lxml, BeautifulSoup comparison
from bs4 import BeautifulSoup as bs
from pyquery import PyQuery as pq
from lxml.html import fromstring
import re
import requests
import time
def Timer():
@ecos
ecos / FTP Upload and URL in Clipboard
Created March 19, 2013 15:13
A cool Windows batch script to upload a file to an FTP folder, and then copy the URL in the clipboard. Useful for posting screenshots quickly in a post on a forum. You only have to change these parameters SET Server=yourFTPserver SET UserName=yourFTPusername SET Password=yourpassword SET RemoteFolder=/www/images/screenshots SET ClipboardURLPrefi…
@ECHO OFF
ECHO Upload to FTP
ECHO Written by: Jason Faulkner
ECHO SysadminGeek.com
ECHO. Improved by ecos
ECHO.
REM Usage:
REM UploadToFTP [/L] FileToUpload
REM
@cvrebert
cvrebert / css_regression_testing.md
Last active May 9, 2023 12:13
Survey of screenshot-based CSS testing tools

Currently considering https://github.com/webdriverio/webdrivercss


Core Goals:

  • Can test in up-to-date versions of all major browsers
  • Can test on up-to-date versions of all major OSes
  • Can test in IE9 (because Bootstrap v4 will support IE9+)
  • Don't want to have to setup/maintain our own cluster of VMs running all the necessary OSes (and all the versions of Windows)
  • Workflow for management of reference/baseline/norm screenshots