Skip to content

Instantly share code, notes, and snippets.

View aliasaria's full-sized avatar

ali asaria aliasaria

View GitHub Profile
@aliasaria
aliasaria / Selenium_Delete_Slack_Files.xml
Created April 28, 2016 21:41
Selenium Script to Delete Files on Slack
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="https://tulip.slack.com/files" />
<title>deletefiles</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
@aliasaria
aliasaria / gist:1f7bafaa44f2484ee42c
Last active August 29, 2015 14:06
PHP to download a file quickly and process it
<?php
$url = 'xxx';
$filename = "yyy";
$ch = curl_init( $url );
//we could use tempnam http://php.net/manual/en/function.tempnam.php but we don't...
//or we could even better use tmpfile ( void ) http://php.net/manual/en/function.tmpfile.php but we don't...
$tmpfname = "/tmp/" . $filename;