Skip to content

Instantly share code, notes, and snippets.

@andreaforni
andreaforni / export_vscode_extesions.md
Created December 22, 2020 16:42 — forked from joseluisq/export_vscode_extesions.md
How to export your VS Code extensions from terminal

How to export your VS Code extensions from terminal

Note: Unix-like systems only.

  1. Export your extensions to a shell file:
code --list-extensions | sed -e 's/^/code --install-extension /' > my_vscode_extensions.sh
@andreaforni
andreaforni / gist:ddca90259d903a34cc5b7a6d15dbb6d4
Last active November 18, 2016 10:31 — forked from ept/gist:4475995
Syntax highlighting code for PowerPoint (Mac OS)

How to add syntax-highlighted code to PowerPoint slides (Mac OS)

  1. pygmentize -f rtf FILE | pbcopy
  2. Paste into TextEdit (in rich text mode: Format → Make Rich Text before pasting), and copy to clipboard again.
  3. In PowerPoint, Edit → Paste Special… → Styled Text.

(Pasting RTF directly into PowerPoint doesn't work correctly, at least with PowerPoint 2008 — it extends colour spans longer than it should, and sometimes removes line breaks. Going via TextEdit seems to solve the problem.)

@andreaforni
andreaforni / tmux.cheat
Last active March 23, 2018 11:38 — forked from afair/tmux.cheat
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^a w
New -s <session> Create ^a c
Attach att -t <session> Rename ^a , <name>
Rename rename-session -t <old> <new> Last ^a l (lower-L)
Kill kill-session -t <session> Close ^a &
@andreaforni
andreaforni / chrome-angular.js
Created November 24, 2015 16:21 — forked from mgol/chrome-angularjs.js
Chrome DevTools Snippet for Angular apps.
var ngAppElem = angular.element(document.querySelector('[ng-app],[data-ng-app]') || document);
window.$injector = ngAppElem.injector();
window.inject = $injector.invoke;
window.$rootScope = ngAppElem.scope();
// getService('auth') will create a variable `auth` assigned to the service `auth`.
var getService = function getService(serviceName) {
inject([serviceName, function (s) {window[serviceName] = s;}]);
};