Skip to content

Instantly share code, notes, and snippets.

View mubbashir's full-sized avatar

Ahmed Mubbashir Khan mubbashir

View GitHub Profile
@dnozay
dnozay / _Jenkins+Script+Console.md
Last active May 3, 2024 09:33
jenkins groovy scripts collection.
@datakurre
datakurre / SauceLabs.py
Last active April 3, 2020 13:50
Robot Framework Selenium test suite with Sauce Labs support
import re
import requests
import simplejson as json
from robot.api import logger
from robot.libraries.BuiltIn import BuiltIn
USERNAME_ACCESS_KEY = re.compile('^(http|https):\/\/([^:]+):([^@]+)@')
@roundand
roundand / OpenWithSublimeText3.bat
Last active March 13, 2024 17:38 — forked from mrchief/LICENSE.md
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 7)
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@cgoldberg
cgoldberg / test_xvfb_selenium.py
Created November 20, 2012 14:07
headless Selenium WebDriver tests. Python unittest launching browser inside Xvfb.
#!/usr/bin/env python
#
# Corey Goldberg - 2012
#
# requires:
# * Xvfb
# * X Windows
# * xvfbwrapper (pip install xvfbwrapper)
#
@dvdsgl
dvdsgl / Procfile
Created February 25, 2012 21:58
Automated Jenkins Comments on GitHub Pull Requests
web: node server.js
@rkh
rkh / chat.rb
Created December 14, 2011 12:55
Simple Chat Application using the Sinatra Streaming API
# coding: utf-8
require 'sinatra'
set server: 'thin', connections: []
get '/' do
halt erb(:login) unless params[:user]
erb :chat, locals: { user: params[:user].gsub(/\W/, '') }
end
get '/stream', provides: 'text/event-stream' do
@them
them / update_chromium.command
Created June 9, 2011 21:16
Quick and dirty Chromium downloader for OSX till Chromatic is updated
#!/bin/bash
# Quick and dirty Chromium updater till Chromatic is updated.
# Beware there is no safety net, use at your own risk!
# Where is Chromium installed?
INSTALLFOLDER='/Applications/Internet';
RELEASE_TYPE="snapshots"
# Get current installed version
CURRENT=$(xpath $INSTALLFOLDER/Chromium.app/Contents/Info.plist '/plist/dict/key[. = "SCMRevision"]/following-sibling::string[1]/text()' 2> /dev/null);
@dmitriy-kiriyenko
dmitriy-kiriyenko / console
Created May 16, 2011 12:51
Init.d to start/stop xvfb. Put it into /etc/init.d and chmod it to 755
apt-get install xvfb
apt-get install firefox
@jarib
jarib / example.rb
Created April 29, 2011 23:43
WebDriver port pool / no-lock
pool = WebDriverPortPool.new(8)
port = pool.get
driver = Selenium::WebDriver::Driver.new(NoLockFirefoxBridge.new(:port => port))
# do some work
driver.quit
pool.release port
require 'sinatra'
require 'dm-core'
require 'dm-migrations'
require 'haml'
DataMapper.setup(:default, 'sqlite3::memory:')
class Message
include DataMapper::Resource