Skip to content

Instantly share code, notes, and snippets.

@wsaribeiro
wsaribeiro / Batch Field Updater
Created February 23, 2024 01:27 — forked from AlwaysThinkin/Batch Field Updater
A generic Apex Batch Update to update a field on all records for an sObject class based on the examples from the Developer Guide
/* BatchRecordUpdate will update any 1 field on any 1 object.
*
* String values must be set to Object, Field and Value to be added to Field.
*
* Query can be modified to limit records updated.
* Example below excludes records for which Degree Offering already equals the new value.
*
* All 4 strings' values must be set to operate when executed.
*
* Execute in Anonymous Apex.
@wsaribeiro
wsaribeiro / OpenSourceBaas.md
Created January 4, 2024 21:46 — forked from PARC6502/OpenSourceBaas.md
List of open source, self hosted BaaS - Backend as a service

Backend as a Service

Supabase - ~52K stars

  • Designed explicitly as an open source firebase alternative
  • Typescript based
  • Docker support

Appwrite - ~32K stars

  • Written in JavaScript and PHP
  • Docker based
  • Realtime support across all services
@wsaribeiro
wsaribeiro / refresh_mediastore.sh
Created November 14, 2023 16:31 — forked from rosuH/refresh_mediastore.sh
[ADB Refresh Mediastore] #Android #Media
#!/bin/bash
adb shell 'su -c "am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///mnt/sdcard/DCMI/Images_new/"'
@wsaribeiro
wsaribeiro / exiftool-snippets.bash
Created November 13, 2023 23:43 — forked from charliecm/exiftool-snippets.bash
Useful metadata editing and batch renaming snippets using exiftool.
# Changing metadata -----------------------------------------------------------
# Copy tags from one file to another
# http://thomer.com/howtos/copy_exif.html
exiftool -TagsFromFile a.jpg b.jpg
# Photos — change CreateDate metadata
exiftool "-CreateDate=2017:05:17 12:00:00" IMG.jpg
# Videos — change date to "Creation Date" (written by DSLRs)
@wsaribeiro
wsaribeiro / commands
Created November 13, 2023 23:43 — forked from rubenxyz/commands
# YOUTUBE-DL #
youtube-dl --yes-playlist -f best -i -v -w -c
# EXIFTOOL #
#Remove all exif data, except Label
exiftool -r -all= -ext jpg -ext gif -ext png -tagsfromfile @ -Label
@wsaribeiro
wsaribeiro / cl.sh
Created November 13, 2023 23:43 — forked from andrashann/cl.sh
Command line notes – a collection of useful one-liners
# Copyright 2019 A. H.
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
@wsaribeiro
wsaribeiro / mv-compress.sh
Created November 8, 2023 01:51 — forked from SuaYoo/mv-compress.sh
ffmpeg music video compression for web (Apple/Mac)
# Software encoding, more options, slower
ffmpeg \
-i input.mov \
-hwaccel auto \
-c:v libx264 \
-c:a aac_at \
-b:a 320k \
-crf 17 \
-preset slow \
-movflags +faststart \
// Lista
AC, Acre
AL, Alagoas
AP, Amapá
AM, Amazonas
BA, Bahia
CE, Ceará
DF, Distrito Federal
ES, Espirito Santo
@wsaribeiro
wsaribeiro / delall-icloud-photos.py
Created June 29, 2023 18:53 — forked from Tatsh/delall-icloud-photos.py
Use pyicloud to delete all photos from iCloud (may need to be run multiple times)
#!/usr/bin/env python
from __future__ import print_function
import json
import sys
from authentication import authenticate
from future.moves.urllib.parse import urlencode
if __name__ == '__main__':
username = sys.argv[1]
@wsaribeiro
wsaribeiro / find_mongodb.js
Created January 8, 2021 02:10 — forked from franciellyferreira/find_mongodb.js
Exemplos - MongoDB
// Busca todos os alunos
db.alunos.find()
// Busca todos os alunos com o mesmo nome
db.alunos.find(
{nome: "João Antônio}
)
// Busca todos os alunos que possuem uma determinada habilidade
db.alunos.find(