Skip to content

Instantly share code, notes, and snippets.

View Snesi's full-sized avatar
🏠
Working from home

David Domingo Snesi

🏠
Working from home
View GitHub Profile
@Snesi
Snesi / TransmitOpenTerminal.txt
Created August 15, 2018 18:58 — forked from johnfmorton/TransmitOpenTerminal.txt
Use Transmit 5 to open in iTerm (instead of Terminal.app) as mentioned here https://library.panic.com/transmit5/open-in-terminal/
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"
activate
set targetTab to ""
@Snesi
Snesi / VS Code Key Bindings
Created June 5, 2018 18:42
VS Code Keybindings similar to IntelliJ
// 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
Snesi / rotation-correction.pipe.ts
Last active April 24, 2020 03:16
Angular 2+ Pipe that auto-rotate images locally in the browser by parsing exif data in pipe inspired by https://gist.github.com/runeb/c11f864cd7ead969a5f0
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 ->