Skip to content

Instantly share code, notes, and snippets.

View UnitedWithCode's full-sized avatar
🎯
Focusing

Prateek Sharma UnitedWithCode

🎯
Focusing
View GitHub Profile
@UnitedWithCode
UnitedWithCode / submit.md
Created June 4, 2021 11:02 — forked from tanaikech/submit.md
Adding Query Parameters to URL using Google Apps Script

Adding Query Parameters to URL using Google Apps Script

This is for adding the query parameters to the URL. This sample script is prepared by ES5. So this can be also used for Javascript. When I created an endpoint with some query parameters, I had used the scripts of various patterns every time. Today, I prepared this sample script to unify them. If this is also useful for you, I'm glad.

Sample script :

String.prototype.addQuery = function(obj) {
  return this + Object.keys(obj).reduce(function(p, e, i) {
    return p + (i == 0 ? "?" : "&") +
      (Array.isArray(obj[e]) ? obj[e].reduce(function(str, f, j) {
 return str + e + "=" + encodeURIComponent(f) + (j != obj[e].length - 1 ? "&" : "")
@UnitedWithCode
UnitedWithCode / docker-help.md
Created June 9, 2021 05:04 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@UnitedWithCode
UnitedWithCode / download-file.js
Created June 29, 2021 02:58 — forked from javilobo8/download-file.js
Download files with AJAX (axios)
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
document.body.appendChild(link);
@UnitedWithCode
UnitedWithCode / StitchingSheets.js
Created June 30, 2021 06:07 — forked from mrlynn/StitchingSheets.js
Google Sheets Script - Complete Script for Article Stitching Sheets
/****
* Michael Lynn - http://blog.mlynn.org
* Stitching Sheets - Integrating Google Sheets with MongoDB Using MongoDB Stitch
****/
// Create an object which contains keys for each column in the spreadsheet
var columns = { // 0 indexed
type: 2,
date_start: 3,
date_end: 4,
@UnitedWithCode
UnitedWithCode / upload.js
Created July 8, 2021 18:16 — forked from virolea/upload.js
Tracking file upload progress using axios
upload(files) {
const config = {
onUploadProgress: function(progressEvent) {
var percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total)
console.log(percentCompleted)
}
}
let data = new FormData()
data.append('file', files[0])
---
version: "2.1"
services:
projectsend:
image: linuxserver/projectsend
container_name: projectsend
environment:
- PUID=998
- PGID=100
- TZ=America/Denver
@UnitedWithCode
UnitedWithCode / AppStyles.js
Created August 6, 2021 12:20 — forked from adrianhajdin/AppStyles.js
Video Chat Styles
const useStyles = makeStyles((theme) => ({
appBar: {
borderRadius: 15,
margin: '30px 100px',
display: 'flex',
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
width: '600px',
border: '2px solid black',
@UnitedWithCode
UnitedWithCode / Common-Currency.json
Created August 10, 2021 12:10 — forked from ksafranski/Common-Currency.json
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@UnitedWithCode
UnitedWithCode / appsscript.json
Created September 25, 2021 07:55 — forked from podrezo/appsscript.json
Google Data Studio Connector: Toronto City Council Attendance
{
"timeZone": "America/Toronto",
"dependencies": {},
"dataStudio": {
"name": "Toronto City Council Attendance",
"logoUrl": "https://i.imgur.com/e9wE7Md.png",
"company": "Petro Podrezo",
"companyUrl": "https://toronto.ca/",
"addonUrl": "https://toronto.ca/",
"supportUrl": "https://toronto.ca/",
# Freelancing Reviews Samples
=======================================================================
****
=======================================================================
## Buyer Reviews to Sellers
=======================================================================