Skip to content

Instantly share code, notes, and snippets.

View hemanth22's full-sized avatar

Hemanth B hemanth22

View GitHub Profile
@hemanth22
hemanth22 / pom.xml
Created November 4, 2018 12:30 — forked from 13yo/pom.xml
Example pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>jpademo</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<scm>
@hemanth22
hemanth22 / git-io-custom-url.md
Created November 18, 2018 05:22 — forked from dikiaap/git-io-custom-url.md
git.io custom URL

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
  • https://*.github.com/*
  • https://*.github.io
@hemanth22
hemanth22 / git.io.sh
Created November 18, 2018 07:09
Git.io custom url
curl https://git.io -F "url=https://gist.githubusercontent.com/gabrielbarros/4e7a81ea0e8694ded9aa0d648aebc231/raw" -F "code=howto"
# Then: https://git.io/howto
@hemanth22
hemanth22 / make_github_issue.py
Created January 19, 2019 13:44 — forked from JeffPaine/make_github_issue.py
Make an issue on github using API V3 and Python
import json
import requests
# Authentication for user filing issue (must have read/write access to
# repository to add issue to)
USERNAME = 'CHANGEME'
PASSWORD = 'CHANGEME'
# The repository to add this issue to
REPO_OWNER = 'CHANGEME'
@hemanth22
hemanth22 / speedtest-ifttt.sh
Created January 19, 2019 16:10 — forked from aallan/speedtest-ifttt.sh
Modified version of Henrik Bengtsson's speedtest-cli code which will dispatch the test results to the IFTTT Maker Channel.
#!/usr/bin/env bash
###########################################################################
# Originally written by: Henrik Bengtsson, 2014
# https://github.com/HenrikBengtsson/speedtest-cli-extras
# Modified to use IFTTT by: Alasdair Allan, 2015
# License: GPL (>= 2.1) [http://www.gnu.org/licenses/gpl.html]
###########################################################################
# Character for separating values
# (commas are not safe, because some servers return speeds with commas)
@hemanth22
hemanth22 / notify_by_ifttt.pl
Created January 19, 2019 16:42 — forked from stefb69/notify_by_ifttt.pl
Nagios / Shinken notification script to trigger ifttt receipes via Maker Channel
#!/usr/bin/perl -w
# IFTTT Notification for nagios,
# Largely inspired from the Notify My Andoid perl code
use strict;
use LWP::UserAgent;
use Getopt::Long;
use Pod::Usage;
# Grab our options.
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.WebResource;
import lombok.Data;
import org.codehaus.jackson.map.ObjectMapper;
import javax.ws.rs.core.MediaType;
import java.io.IOException;
/**
* A easy to use class to facilitate calling the IFTTT Maker API (https://ifttt.com/maker) to trigger IFTTT recipes.
@hemanth22
hemanth22 / ifttt.py
Created January 19, 2019 16:44 — forked from rekyuu/ifttt.py
weechat ifttt script
import weechat, requests
weechat.register("ifttt", "rekyuu", "1.0", "MIT", "IFTTT: Send push notifications to IFTTT.", "", "")
settings = {
"trigger": "",
"token": ""
}
@hemanth22
hemanth22 / ifttt_jenkins.py
Created January 19, 2019 16:50 — forked from upgundecha/ifttt_jenkins.py
"If This Then That" Jenkins example
#!/usr/bin/env python3
# Copyright (c) 2016 Anki, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License in the file LICENSE.txt or at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@hemanth22
hemanth22 / ifttt.sh
Created January 19, 2019 16:54 — forked from tateren/ifttt.sh
#!/bin/bash
CURL=/usr/bin/curl
IFTTT_EVENT="$1"
IFTTT_KEY="XXXXXXXXXXXXXXXXXXXXX"
IFTTT_URL="https://maker.ifttt.com/trigger/${IFTTT_EVENT}/with/key/${IFTTT_KEY}"
${CURL} -X POST \
${IFTTT_URL} \
--header "Content-Type: application/json" \
--data-binary "{\"value1\": \"$2\",\"value2\": \"$3\",\"value3\": \"$4\"}"