Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

upload accelerate 2012

By: a guest on May 2nd, 2012  |  syntax: Power Shell  |  size: 0.79 KB  |  hits: 60  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. $zip_name = "{SECRET-ID}.zip"
  2. $zip_path = "c:\Program Files\7-Zip\7z.exe"
  3. $uri = "http://intel-software-academic-program.com/ayc-upload/upload.php"
  4.  
  5. if ([IO.File]::Exists($zip_name)) {
  6.         rm $zip_name
  7. }
  8. $temp_dir = [IO.Path]::Combine($PWD, [IO.Path]::GetRandomFileName())
  9. mkdir $temp_dir
  10. copy "Makefile" $temp_dir
  11. mkdir ([IO.Path]::Combine($temp_dir, "obj"))
  12. $src = [IO.Path]::Combine($temp_dir, "src")
  13. mkdir $src
  14. copy ./* -Include "*.cpp","*.h","*.c" -Destination $src
  15. &$zip_path "a", $zip_name, ($temp_dir+"\*")
  16. rmdir $temp_dir -Force -Recurse
  17. $client = New-Object System.Net.WebClient
  18. echo "uploading..."
  19. echo ([System.Text.Encoding]::ASCII.GetString($client.UploadFile($uri, $zip_name)))
  20. rm $zip_name
  21. echo "Press any key to close..."
  22. $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")