Skip to content

Instantly share code, notes, and snippets.


Lio李歐 lionello

View GitHub Profile
mmizutani / envoy-schema.json
Last active Jul 5, 2022 — forked from linux-china/envoy-schema.json
Envoy configuration json schema for Json and Yaml based on Envoy v1.20.1 (e9f36d2)
View envoy-schema.json
"$schema": "",
"properties": {
"node": {
"properties": {
"id": {
"type": "string",
"description": "An opaque node identifier for the Envoy node. This also provides the local\n service node name. It should be set if any of the following features are\n used: :ref:`statsd <arch_overview_statistics>`, :ref:`CDS\n <config_cluster_manager_cds>`, and :ref:`HTTP tracing\n <arch_overview_tracing>`, either in this message or via\n :option:`--service-node`."
"cluster": {
View Autocomplete-AutocompleteObject.swift
final class AutocompleteObject: ObservableObject {
let delay: TimeInterval = 0.3
@Published var suggestions: [String] = []
init() {
dvf /
Last active Aug 4, 2022
Enable High Quality mode on your headphones (Updated for macOS Catalina)

If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.

Find out what codec you're using

  1. Play a song on your headphones
  2. Option (⌥) click the Bluetooth button at the top of your screen Inspect the Bluetooth Coded
  3. If you're using AAC or aptX, you can stop here—those are the highest quality codecs.

Change your codec to AAC or aptX

blixt /
Last active Apr 16, 2022
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!

harunpehlivan / index.html
Created Aug 17, 2019
Social Media Color Hex Codes
View index.html
<div class="SocialMediaColors">
<div class="facebook-color fa fa-facebook"><span><br>Facebook<br>Hex: #3b5998</span></div>
<div class="twitter-color fa fa-twitter"><span><br>Twitter<br>Hex: #00aced</span></div>
<div class="GooglePlus-color fa fa-google-plus"><span><br>Google +<br>Hex: #dd4b39</span></div>
<div class="pinterest-color fa fa-pinterest"><span><br>Pinterest<br>Hex: #cb2027</span></div>
<div class="linkedin-color fa fa-linkedin"><span><br>Linkedin<br>Hex: #007bb6</span></div>
View what each nix Dev should

fix function - , , point where x = f(x) = f(f(f(f....f(x)....)))

rec { a = 1; b = a + 1; } is the same as fix (self: { a = 1; b = self.a + 1; })

builtins.trace - trace has different flavors, all lazy languages have trace

builtins.seq - in lazy languages data is represented as thunks (IF data has not been yet evaluated THEN it's pointer on function that should produce this data ELSE it's pointer on data), builtins.seq forces first layer of data to evaluate (evaluates it to WHNF?), builtins.deepSeq is recursive variant of seq, it forces whole data to evaluate (evaluates it to NF?), (more,

lionello / .direnvrc
Last active Aug 6, 2019 — forked from adisbladis/.direnvrc
Direnv nix cache. Put this file in your HOME folder.
View .direnvrc
# Cache nix-shell environment
# - watches shell.nix (or default.nix), ~/.direnvrc and .envrc
# - based on
use_nix() {
local shell_file=$(test -f shell.nix && echo shell.nix || echo default.nix)
if [[ ! -f "$shell_file" ]]; then return; fi
sveitser / Entropy.ipynb
Last active Sep 7, 2018
Was wondering about entropy of pass phrases.
View Entropy.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View -
{ pkgs ? import <nixpkgs> {} }:
inherit (pkgs) lib stdenv ruby_2_3 rake bundler bundlerEnv openssl defaultGemConfig;
rubyEnv = bundlerEnv {
name = "mezzo";
ruby = ruby_2_3;
gemdir = ./.;
adisbladis / .direnvrc
Created Jun 6, 2018
direnvrc nix cache
View .direnvrc
use_nix() {
local shell_file=$(test -f shell.nix && echo shell.nix || echo default.nix)
local cache_key=$(nix-instantiate "$shell_file" 2> /dev/null | shasum -a 1 | cut -d ' ' -f 1)
# Use ram as virtualenv storage
local tmpdir
case $(uname -s) in
Linux*) tmpdir=$XDG_RUNTIME_DIR;;
Darwin*) tmpdir_SDK=$TMPDIR;;
*) tmpdir=/tmp