Skip to content

Instantly share code, notes, and snippets.

@Spencer-Easton
Spencer-Easton / exportSpreadsheet.gs
Last active March 21, 2024 00:43
Example on how to export a Google sheet to various formats, includes most PDF options
function exportSpreadsheet() {
//All requests must include id in the path and a format parameter
//https://docs.google.com/spreadsheets/d/{SpreadsheetId}/export
//FORMATS WITH NO ADDITIONAL OPTIONS
//format=xlsx //excel
//format=ods //Open Document Spreadsheet
//format=zip //html zipped
@anildigital
anildigital / gist:862675ec1b7bccabc311
Created July 26, 2014 18:27
Remove dangling docker images
docker rmi $(docker images -q -f dangling=true)
@jpotts
jpotts / gist:10878584
Created April 16, 2014 13:50
Remove an aspect from every node in the repository
var results = search.luceneSearch("ASPECT:\"ASPECT NAME HERE\"");
for each (var doc in results) {
doc.removeAspect("ASPECT NAME HERE");
}
@olasd
olasd / stream_to_youtube.sh
Created March 28, 2014 19:58
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
@loftux
loftux / resetDashboard.js
Created September 11, 2013 12:50
Script to reset user dashboard in Alfresco. Actually two scripts in same Gist. To be used with the Alfresco Javascript console//
//***** Script variant one, fore one user ********
var userid = "userid01";
var searchobj = {
query:'PATH:"/app:company_home/st:sites/cm:surf-config/cm:components/*" AND @cm\:name:"*'+userid+'*"',
language: 'fts-alfresco'
};
var nodes = search.query(searchobj);
@mattgorecki
mattgorecki / RaspberryPi-RFID
Created July 26, 2013 01:34
Python script to read RFID card from serial RFID reader attached to a Raspberry Pi. Also has a Exit button. The card swipe releases the maglock on the door.
#!/usr/bin/python2
import serial
import re, sys, signal, os, time, datetime
import RPi.GPIO as GPIO
BITRATE = 9600
GPIO.setmode(GPIO.BOARD)
GPIO.setup(7, GPIO.OUT)
GPIO.setup(3, GPIO.IN, pull_up_down=GPIO.PUD_UP)