Skip to content

Instantly share code, notes, and snippets.

View markxp's full-sized avatar

markxp markxp

View GitHub Profile
@markxp
markxp / convert.sh
Created September 30, 2016 00:29 — forked from akost/convert.sh
Bash script for recursive file convertion windows-1251 --> utf-8
#!/bin/bash
# Recursive file convertion windows-1251 --> utf-8
# Place this file in the root of your site, add execute permission and run
# Converts *.php, *.html, *.css, *.js files.
# To add file type by extension, e.g. *.cgi, add '-o -name "*.cgi"' to the find command
find ./ -name "*.php" -o -name "*.html" -o -name "*.css" -o -name "*.js" -type f |
while read file
do
@markxp
markxp / submit.md
Created September 3, 2018 01:48 — forked from tanaikech/submit.md
Multipart-POST Request Using Google Apps Script

Multipart-POST Request Using Google Apps Script

These sample scripts are for requesting multipart post using Google Apps Script.

In most cases, the multipart request is used for uploading files. So I prepared 2 sample situations as follows. For each situation, the request parameters are different.

  1. Upload a file from Google Drive to Slack.
  2. Convert an excel file to Spreadsheet on Google Drive using Drive API v3.

Multipart post is required for these situations.