Skip to content

Instantly share code, notes, and snippets.

View muarts's full-sized avatar
🎯
Focusing

murat sökücü muarts

🎯
Focusing
View GitHub Profile
@stekhn
stekhn / post-to-slack.sh
Created March 2, 2020 12:21
Post to Slack using curl on the command line. The incoming webhook for your Slack team needs to be created beforehand.
# Read more about Slack webhooks here: https://api.slack.com/messaging/webhooks
curl -X POST \
-H 'Content-type: application/json; charset=utf-8' \
--data '{ "channel": "#mychannel", "username": "superbot", "icon_emoji": ":bot:", "text": "Foo" }' \
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
@djangofan
djangofan / gist:2865537
Created June 4, 2012 00:09
Dynamically load data into a DataProvider from a file using TestNG
@DataProvider(name = "DPMethodAlias") // Get A Form
public static Object[][] getFromFile() {
System.out.println("Loading data provider DPMethodAlias...");
// lastRun is a timestamp value used to find the .tests file
File tFile = new File( "test-output/work/" + WSUtils.getTestProperty("lastRun", "testng.config") + ".tests");
FileReader fileReader = null;
List<String> lines = new ArrayList<String>();
try {
String line = null;
fileReader = new FileReader( tFile );