Skip to content

Instantly share code, notes, and snippets.


Lio李歐 lionello

View GitHub Profile
lionello / writevt.c
Last active Aug 1, 2022
Forked writevt from console-tools
View writevt.c
* Mostly ripped off of console-tools' writevt.c
#include <stdio.h>
#include <fcntl.h>
#include <termios.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <string.h>
lionello /
Created Jun 13, 2022 — forked from bgreenlee/
Automatic project versioning for Xcode using git commits & tags #xcode #git
# by Marc Hedlund
# Found at and slightly
# modified.
# To install:
lionello / translatekeycodes.swift
Created Jan 18, 2022 — forked from ArthurYidi/translatekeycodes.swift
virtual key codes to unicode characters
View translatekeycodes.swift
private static func keyCodeToString(keyCode: CGKeyCode, eventModifiers: Int) -> String? {
let curKeyboard = TISCopyCurrentKeyboardInputSource().takeRetainedValue()
let rawLayoutData = TISGetInputSourceProperty(curKeyboard, kTISPropertyUnicodeKeyLayoutData)
let layoutData = unsafeBitCast(rawLayoutData, to: CFData.self)
let keyboardLayoutPtr = unsafeBitCast(CFDataGetBytePtr(layoutData), to: UnsafePointer<UCKeyboardLayout>.self)
var deadKeyState: UInt32 = 0
var actualStringLength = 0
var unicodeString: [UniChar] = [0, 0, 0, 0]
View igloo.dxf
"DXF R12 Output" (
View .emacs
(require 'package)
(add-to-list 'package-archives '("org" . ""))
(add-to-list 'package-archives '("melpa" . ""))
(add-to-list 'package-archives '("melpa-stable" . ""))
(setq package-enable-at-startup nil)
View Loan Project.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
lionello /
Last active Jul 7, 2021 — forked from blixt/
Playing SteamVR games on the Oculus Quest

Playing SteamVR games on the Oculus Quest, without owning a PC

Setting up your Virtual Machine

We'll be creating a new Virtual Machine on Microsoft's cloud platform, Azure. The VM will have a beefy GPU just like a home computer so it can be used for playing games.

  1. Go to [the Azure portal][azure] and sign up or log in.
  2. If you are on a Free account, first go to Subscriptions and upgrade it to a Pay-as-you-go plan. Don't worry, you will get to keep any free credits you have. Azure's interface is a bit slow so this will take a minute.

⚠️ Make sure to not include any support plan because they will charge you monthly!

# Avoid default fish path abbreviation
set -g -x fish_prompt_pwd_dir_length 0
# Use vim as default editor in fish
set -g -x EDITOR vim
# Force language of CLI tools to English (US)
set -g -x LANG en_US.UTF-8
#status --is-interactive; and source (rbenv init -|psub)
lionello / Visual Studio copy.xml
Created Aug 5, 2019
IntelliJ AndroidStudio Keymap
View Visual Studio copy.xml
<keymap version="1" name="Visual Studio copy" parent="Visual Studio">
<action id="$Copy">
<keyboard-shortcut first-keystroke="ctrl c" />
<keyboard-shortcut first-keystroke="meta c" />
<action id="$Cut">
<keyboard-shortcut first-keystroke="ctrl x" />
<keyboard-shortcut first-keystroke="shift delete" />
<keyboard-shortcut first-keystroke="meta x" />
lionello / settings.json
Last active Aug 5, 2019
VSCode user settings JSON
View settings.json
"telemetry.enableTelemetry": false,
"window.openFilesInNewWindow": "off",
"go.useLanguageServer": true,
"": "/Users/llunesu/.nix-profile/bin/fish",
"workbench.colorTheme": "Dark (Monokai)",
"editor.rulers": [
0, 80, 120
"files.trimTrailingWhitespace": true,