Skip to content

Instantly share code, notes, and snippets.

To relink, run:
brew unlink git && brew link git
Use brew git
brew install git
brew link --overwrite git
@michaellouieloria
michaellouieloria / gist:ff83ed5f27c67bf0b7d4107e83fd6c9a
Last active February 3, 2021 20:02
allow virtual camera in ms teams macos
https://answers.microsoft.com/en-us/msteams/forum/msteams_tfb-msteams_tfmac/microsoft-teams-mac-os-client-is-not-recognizing/d9e863be-d9a4-4d03-a4b8-1b5c7df58828
https://docs.microsoft.com/en-us/answers/questions/148337/virtual-cam-broken-for-teams-version-130028778-mac.html
sudo codesign --remove-signature "/Applications/Microsoft Teams.app"
sudo codesign --remove-signature "/Applications/Microsoft Teams.app/Contents/Frameworks/Microsoft Teams Helper.app"
sudo codesign --remove-signature "/Applications/Microsoft Teams.app/Contents/Frameworks/Microsoft Teams Helper (GPU).app"
sudo codesign --remove-signature "/Applications/Microsoft Teams.app/Contents/Frameworks/Microsoft Teams Helper (Plugin).app"
@michaellouieloria
michaellouieloria / gist:7aec2e01317414509b0d473eab08d539
Created May 19, 2020 19:16
Heroku: Copying environment variables from an existing app to another
heroku config -s -a existing-heroku-app > config.txt
cat config.txt | tr '\n' ' ' | xargs heroku config:set -a new-heroku-app
or
heroku config -s -a existing-heroku-app | tr '\n' ' ' | xargs heroku config:set -a new-heroku-app
https://wiki.postgresql.org/wiki/Apt
pgloader mysql://root@localhost/test2 postgresql://postgres:postgres@localhost:5432/tire_website_development
delete folders db and app/models in subtree-api and subtree-admin
add remote
git remote add subtree-models [email protected]:michaellouieloria/subtree-models.git
git remote add subtree-db [email protected]:michaellouieloria/subtree-db.git
add subtree
git subtree add --prefix=app/models subtree-models master
git subtree add --prefix=db subtree-db master
@michaellouieloria
michaellouieloria / redis-one-line--pattern-delete.sh
Created June 9, 2017 04:38 — forked from MattSurabian/redis-one-line--pattern-delete.sh
One liner for deleting based on a pattern in redis. KEYS supports wildcards, delete doesn't. No worries xargs to the rescue. You might not need HOST, or PORT depending on your setup. You might need to sudo BOTH commands depending on your setup.
redis-cli -h <HOST> -p <PORT> KEYS "<PATTERN>" | xargs -i% redis-cli -h <HOST> -p <PORT> DEL %
@michaellouieloria
michaellouieloria / carrier_wave.rb
Created November 8, 2016 03:12 — forked from gshaw/carrier_wave.rb
CarrierWave initialization file for testing with fixtures and support S3 in staging and production.
# NullStorage provider for CarrierWave for use in tests. Doesn't actually
# upload or store files but allows test to pass as if files were stored and
# the use of fixtures.
class NullStorage
attr_reader :uploader
def initialize(uploader)
@uploader = uploader
end
http://guides.rubyonrails.org/caching_with_rails.html
http://www.sitepoint.com/rails-model-caching-redis/
http://www.nateberkopec.com/2015/07/15/the-complete-guide-to-rails-caching.html
https://github.com/mperham/dalli
@michaellouieloria
michaellouieloria / ExcelFormulas.js
Last active March 27, 2020 05:34 — forked from pies/ExcelFormulas.js
Few Excel formulas - PMT, PPMT, XIRR - expressed in Javascript
/* Based on
* - EGM Mathematical Finance class by Enrique Garcia M. <[email protected]>
* - A Guide to the PMT, FV, IPMT and PPMT Functions by Kevin (aka MWVisa1)
*/
var ExcelFormulas = {
PVIF: function(rate, nper) {
return Math.pow(1 + rate, nper);
},
@michaellouieloria
michaellouieloria / gist:7462ca5f689641086a81
Last active August 29, 2015 14:16
Install Neo4j in Ubuntu
wget -O - http://debian.neo4j.org/neotechnology.gpg.key| sudo apt-key add -
sudo -i
echo 'deb http://debian.neo4j.org/repo stable/' > /etc/apt/sources.list.d/neo4j.list
exit
sudo apt-get update
sudo apt-get install neo4j
http://neo4j.com/docs/1.6.2/configuration-linux-notes.html