Skip to content

Instantly share code, notes, and snippets.

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./media/sidebysideeditor';
import { Dimension, $, clearNode } from 'vs/base/browser/dom';
import { Registry } from 'vs/platform/registry/common/platform';
import { IEditorControl, IEditorPane, IEditorOpenContext, EditorExtensions } from 'vs/workbench/common/editor';
import { SideBySideEditorInput } from 'vs/workbench/common/editor/sideBySideEditorInput';
@joaomoreno
joaomoreno / config.xlaunch
Last active January 21, 2021 03:11
Selfhosting VS Code on WSL
<?xml version="1.0" encoding="UTF-8"?>
<XLaunch WindowMode="MultiWindow" ClientMode="NoClient" LocalClient="False" Display="0" LocalProgram="xcalc" RemoteProgram="xterm" RemotePassword="" PrivateKey="" RemoteHost="" RemoteUser="" XDMCPHost="" XDMCPBroadcast="False" XDMCPIndirect="False" Clipboard="True" ClipboardPrimary="True" ExtraParams="" Wgl="True" DisableAC="True" XDMCPTerminate="False"/>
@joaomoreno
joaomoreno / README.md
Last active September 23, 2019 20:28
Plot CPU temperatures with

This plots the CPU temperature of the past 2 minutes in the terminal using spark.

Example run:

current: 58.0
▅▅▄▅▅▅▃▃▃▂▂▂▁▂▂▁▂▂▂▂▂▂▂▂▃▃▃▃▄▃▄▃▅▃▅▄▅▅▆█▆██▆▆█▆
@joaomoreno
joaomoreno / index.html
Created December 4, 2018 10:24
Electron Fiddle Gist
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
<!-- All of the Node.js APIs are available in this renderer process. -->
We are using Node.js <script>document.write(process.versions.node)</script>,
@joaomoreno
joaomoreno / index.html
Created December 4, 2018 10:24
Electron Fiddle Gist
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
<!-- All of the Node.js APIs are available in this renderer process. -->
We are using Node.js <script>document.write(process.versions.node)</script>,
@joaomoreno
joaomoreno / radiotray-ng-now-playing.sh
Created September 13, 2018 09:01
Radiotray-NG Now Playing Script
#!/bin/sh
META=`dbus-send --print-reply --dest=com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state 2> /dev/null`
STATUS=$(echo $META | sed 's/^.*"state"\s*:\s*"\([^"]*\)".*$/\1/')
if [[ "$STATUS" == "playing" ]]; then
ARTIST=$(echo $META | sed 's/^.*"artist"\s*:\s*"\([^"]*\)".*$/\1/')
TITLE=$(echo $META | sed 's/^.*"title"\s*:\s*"\([^"]*\)".*$/\1/')
echo "$ARTIST - $TITLE"
fi
@joaomoreno
joaomoreno / index.html
Created August 2, 2018 13:06
Electron Fiddle Gist
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
<style>
html, body, #container {
width: 100%;
height: 100%;
padding: 0;
@joaomoreno
joaomoreno / README.md
Last active February 1, 2024 22:19
VS Code Insiders Updater for Linux

VS Code Insiders Updater for Linux

This script will download and replace ~/Applications/VSCode-linux-x64 with the latest VS Code Insiders.

gif

Install

  1. Install jq: https://stedolan.github.io/jq/download/
  2. Place update-code somewhere in your PATH
@joaomoreno
joaomoreno / ..Git PR Aliases.md
Last active June 4, 2021 13:57 — forked from gnarf/..git-pr.md
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and merges main into it
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out
@joaomoreno
joaomoreno / bug.cpp
Created January 9, 2018 10:10
timing bug
#include "stdafx.h"
#include <iostream>
#include <chrono>
#include <thread>
int main()
{
while (true) {
std::cout << "sleeping for 500ms" << std::endl;
std::this_thread::sleep_for(std::chrono::milliseconds(500));