Skip to content

Instantly share code, notes, and snippets.

@j33ty
j33ty / print-memory.go
Created May 22, 2019 20:54
Go print current memory
package main
import (
"runtime"
"fmt"
"time"
)
func main() {
// Print our starting memory usage (should be around 0mb)
@javilobo8
javilobo8 / download-file.js
Last active April 9, 2024 12:01
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);
@reslea
reslea / systemFieldsTitles.cs
Created March 1, 2016 20:31
Collection of internal names of system fields in sharepoint, except ID and Title
List<string> systemFieldsTitles = new List<string>()
{
"ContentTypeId",
"_ModerationComments",
"File_x0020_Type",
"ContentType",
"Modified",
"Created",
"Author",
"Editor",