Skip to content

Instantly share code, notes, and snippets.

View ab9-er's full-sized avatar
👨‍💻
Coding my way through

Abhinav ab9-er

👨‍💻
Coding my way through
View GitHub Profile
@ab9-er
ab9-er / friday_patch.py
Created February 19, 2021 02:34
Get Friday Patches
from xml.etree import ElementTree as etree
import urllib
import io
import re
FEED = "https://patchfriday.com/rss.xml"
ERROR_IMG = "https://www.google.com/images/errors/robot.png"
def get_patch():
try:
@ab9-er
ab9-er / world_universities_and_domains.json
Last active April 30, 2018 09:45
List of all the world universities and their domain names
This file has been truncated, but you can view the full file.
[
{
"web_pages": [
"https://www.cstj.qc.ca",
"https://ccmt.cstj.qc.ca",
"https://ccml.cstj.qc.ca"
],
"name": "Cégep de Saint-Jérôme",
"alpha_two_code": "CA",
"state-province": null,
@ab9-er
ab9-er / chrome-headless.robot
Created February 8, 2018 10:08 — forked from nottyo/chrome-headless.robot
Selenium2Library with Chrome Headless Mode
*** Settings ***
Library Selenium2Library
*** Variables ***
${url} https://medium.com/@nottyo/
@{chrome_arguments} --disable-infobars --headless --disable-gpu
${page_text} Test Automation Engineer. Let’s make awesome tests
${timeout} 10s
*** Test Cases ***
@ab9-er
ab9-er / parse_calendar_events.py
Created November 16, 2017 10:43
Parse calendar events from google and sort them
from requests import get
from icalendar import Calendar, Event
from datetime import date
# Get the calendar events in ics format
ics_events = get("https://calendar.google.com/calendar/ical/en.indian%23holiday%40group.v.calendar.google.com/public/basic.ics")
# Parse the calendar string
cal = Calendar.from_ical(ics_events.content)
@ab9-er
ab9-er / slacker_buttons.py
Last active November 13, 2017 09:21
Method to send slack button attachments messages
from slackclient import SlackClient
BOT_TOKEN = "xoxb-12345678"
SLACK_CLIENT = SlackClient(BOT_TOKEN)
SLACK_CLIENT.rtm_connect()
def slacker_buttons(destination=None, as_user=None, text="", at_text=None, attachments=None, color="good"):
"""
destination: String identifier for receiver (ex: @slackbot/#general)
@ab9-er
ab9-er / Jenkinsfile
Created June 30, 2017 18:56 — forked from chinshr/Jenkinsfile
Best of Jenkinsfile, a collection of useful workflow scripts ready to be copied into your Jenkinsfile on a per use basis.
#!groovy
# Best of Jenkinsfile
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins
node {
}
@ab9-er
ab9-er / suppress.yaml
Created April 12, 2017 10:10
Suppress notifications for Stackstorm chatops that pollute the channels. To be used in the action runner setup file.
notify:
on-complete:
data: {}
message: "Step complete!"
routes:
- "#"

Keybase proof

I hereby claim:

  • I am ab9-er on github.
  • I am a_bhi_9 (https://keybase.io/a_bhi_9) on keybase.
  • I have a public key ASA8w-fHr1jaMdEDXx7iiEKqUz5yThUIRMZNO-FuN7xdGwo

To claim this, I am signing this object:

@ab9-er
ab9-er / edit_ace.py
Created September 9, 2016 13:21
A clever hack to edit the Ace editor
def edit_ace_editor(browser, editor_id, content, editor_ref="ace"):
"""
browser: Browser instance returned from selenium
editor_id: The id of the div that holds the ace editor, most of the times it ends with `-editor`
content: The text content that needs to be written in the ace editor
editor_ref: Reference to the editor in the code, most of the times it is ace.
return: Text with the gutter line numbers
"""
browser.execute_script('smart_edit = {}.edit("{}");'.format(editor_ref, editor_id))
@ab9-er
ab9-er / deletetag.sh
Created February 24, 2016 14:49 — forked from sochalewski/deletetag.sh
git: Delete remote tag
git tag -d 12345
git push origin :refs/tags/12345