Skip to content

Instantly share code, notes, and snippets.

View brunomsantiago's full-sized avatar

Bruno Santiago brunomsantiago

  • Brazil
View GitHub Profile

Criando App no Sharepoint para capturar o Access Token

Passo 1 - Registrar um Aplicativo

  • Acessar a URL https://{site_url}/sites/[TENANT-NAME]/_layouts/15/appregnew.aspx
    • [TENANT-NAME] - é nome do site, podendo conter o subsite
  • Em ID do Cliente, clicar em Gerar/Generate;
  • Copiar o ID gerado e salvar em algum lugar seguro;
  • Em Segredo do Cliente, clicar em Gerar/Generate;
  • Copiar o Segredo gerado e salvar em algum lugar seguro;
  • Em Título, inserir um nome de identificação. Atualmente estou colocando Performance CSC;
  • Em Domínio do Aplicativo, pode inserir qualquer site, não faz diferença. Atualmente estou colocando google.com
@hlecuanda
hlecuanda / downloa-all-images-bookmarklet.js
Last active April 28, 2022 20:46
A bookmarklet to download all images on a page, using the FileSystem API
javascript:(function(){
const run = async () => {
const dirHandle = await window.showDirectoryPicker();
const imgs = document.querySelectorAll("img");
let i = 0;
imgs.forEach(async (img) => {
const url = img.src;
const name = `img-${i}.png`;
@dienhoa
dienhoa / tabular-rf.ipynb
Created October 12, 2018 17:39
data preprocessing with Tabular Module fast.ai
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@acbetter
acbetter / QImageViewer.py
Last active April 4, 2024 19:41
Image Viewer Example by PyQt5 and Python 3
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QImage, QPixmap, QPalette, QPainter
from PyQt5.QtPrintSupport import QPrintDialog, QPrinter
from PyQt5.QtWidgets import QLabel, QSizePolicy, QScrollArea, QMessageBox, QMainWindow, QMenu, QAction, \
qApp, QFileDialog
@anthonyeden
anthonyeden / simplistic-ffmpeg-streaming.py
Created May 28, 2018 11:46
Sending FFmpeg output to HTTP, via Python's Flash
"""
Streaming FFmpeg to HTTP, via Python's Flask.
This is an incredibly simple example, which will yield issues due to inconsistant input and output rates.
If you're going to use this, VLC works okay as a client.
You really need to move FFmpeg into a separate thread, which should help stream audio more consistantly to the HTTP client.
Example by Anthony Eden (https://mediarealm.com.au)
"""
from flask import Flask
@beevelop
beevelop / gitprint.js
Created April 11, 2017 10:31
Print GitHub markdown files
document.querySelector('#readme').setAttribute('style', 'position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 100; background-color: white')
document.querySelector('body').appendChild(document.querySelector('#readme'))
window.print()