Skip to content

Instantly share code, notes, and snippets.

View rubenarakelyan's full-sized avatar
💾
Coding and reminiscing

Ruben Arakelyan rubenarakelyan

💾
Coding and reminiscing
View GitHub Profile
@rubenarakelyan
rubenarakelyan / Workspace.code-workspace
Last active January 1, 2023 11:10
Visual Studio Code workspace settings
{
"folders": [],
"settings": {
"diffEditor.ignoreTrimWhitespace": false,
"editor.acceptSuggestionOnEnter": "off",
"editor.bracketPairColorization.enabled": true,
"editor.emptySelectionClipboard": false,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.rulers": [80],
@rubenarakelyan
rubenarakelyan / CompareTools.plist
Created April 14, 2021 10:05
Use Visual Studio Code as a diff and merge tool for Tower 3 (place all files to ~/Library/Application Support/com.fournova.Tower3/CompareTools/ and restart Tower)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>ApplicationIdentifier</key>
<string>com.microsoft.VSCode</string>
<key>ApplicationName</key>
<string>Visual Studio Code</string>
@rubenarakelyan
rubenarakelyan / move-lightroom-originals.rb
Created April 28, 2020 15:03
Move Lightroom CC original files into album-named folders
require "sqlite3"
require "fileutils"
db = SQLite3::Database.new("database/catalog.db")
# Get list of albums
albums = {}
db.execute("select * from albums") do |album|
albums[album[1]] = album[3]
end
@rubenarakelyan
rubenarakelyan / change-author.sh
Last active September 5, 2021 19:03
Change author of all git commits in repo
git filter-branch --env-filter '
OLD_EMAIL="[email protected]"
CORRECT_NAME="My Name"
CORRECT_EMAIL="[email protected]"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
@rubenarakelyan
rubenarakelyan / twilio-sms-to-aws-ses.js
Created July 30, 2018 12:10
Twilio function to translate incoming SMS to email
const nodemailer = require('nodemailer');
exports.handler = function(context, event, callback) {
let transporter = nodemailer.createTransport(
{
host: context.SMTP_HOST,
port: context.SMTP_PORT,
auth: {
type: 'login',
user: context.AWS_ACCESS_KEY_ID,