Skip to content

Instantly share code, notes, and snippets.

Working from home

David Domingo Snesi

Working from home
View GitHub Profile
Snesi / TransmitOpenTerminal.txt
Created Aug 15, 2018 — forked from johnfmorton/TransmitOpenTerminal.txt
Use Transmit 5 to open in iTerm (instead of as mentioned here
View TransmitOpenTerminal.txt
on openTerminal(location, remoteHost, serverPort)
tell application "System Events"
-- some versions might identify as "iTerm2" instead of "iTerm"
set isRunning to (exists (processes where name is "iTerm")) or (exists (processes where name is "iTerm2"))
end tell
tell application "iTerm"
set targetTab to ""
Snesi / VS Code Key Bindings
Created Jun 5, 2018
VS Code Keybindings similar to IntelliJ
View VS Code Key Bindings
// Place your key bindings in this file to overwrite the defaults
"key": "ctrl+enter",
"command": "editor.action.quickFix",
"when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly"
"key": "cmd+.",
"command": "-editor.action.quickFix",
Snesi / rotation-correction.pipe.ts
Last active Apr 24, 2020
Angular 2+ Pipe that auto-rotate images locally in the browser by parsing exif data in pipe inspired by
View rotation-correction.pipe.ts
import { Pipe, PipeTransform } from '@angular/core'
import { SafeHtml, SafeStyle, SafeScript, SafeUrl, SafeResourceUrl, DomSanitizer } from '@angular/platform-browser'
import { Observable } from 'rxjs/Observable'
import 'rxjs/add/observable/bindcallback'
const rotation = {
1: 'rotate(0deg)',
3: 'rotate(180deg)',
6: 'rotate(90deg)',
# Your init script
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
# An example hack to log to the console when each text editor is saved.
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->