Skip to content

Instantly share code, notes, and snippets.

View webern's full-sized avatar

Matthew James Briggs webern

View GitHub Profile
@webern
webern / custom-serde.rs
Created October 26, 2021 21:54 — forked from MightyPork/custom-serde.rs
example of custom serialize and deserialize in serde
use serde::ser::SerializeMap;
use serde::{Serialize, Serializer, de::Visitor, de::MapAccess, Deserialize, Deserializer};
use std::fmt;
#[derive(Debug)]
struct Custom(String, u32);
impl Serialize for Custom {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
@ipatch
ipatch / alacritty.yml
Created September 21, 2018 19:30
alacritty key bindings
key_bindings:
- { key: V, mods: Command, action: Paste }
- { key: C, mods: Command, action: Copy }
- { key: Q, mods: Command, action: Quit }
- { key: W, mods: Command, action: Quit }
- { key: Home, chars: "\x1bOH", mode: AppCursor }
- { key: Home, chars: "\x1b[H", mode: ~AppCursor }
- { key: End, chars: "\x1bOF", mode: AppCursor }
- { key: End, chars: "\x1b[F", mode: ~AppCursor }
- { key: Key0, mods: Command, action: ResetFontSize }
@nahall
nahall / connecting_to_a_ubiquiti_unifi_vpn_with_a_linux_machine.txt
Last active August 14, 2024 12:12
Connecting to a Ubiquiti Unifi VPN with a Linux machine
This guide assumes that you have already set up a Ubiquiti Unifi VPN following the guide:
https://help.ubnt.com/hc/en-us/articles/115005445768-UniFi-L2TP-Remote-Access-VPN-with-USG-as-RADIUS-Server
To configure a Linux machine to be able to connect remotely I followed these steps. This guide was written for Debian 8.
- In Debian install the "xl2tpd" and "strongswan" packages.
- Edit /etc/ipsec.conf to add the connection:
conn YOURVPNCONNECTIONNAME
@tslmy
tslmy / README.md
Last active August 11, 2018 18:03 — forked from mmasashi/README.md
Install Oracle instant client (sqlplus) v12.1 on macOS

Install Oracle instant client (sqlplus) on MacOSX

  1. Get Oracle instant client for MacOSX
  1. Unarchive downloaded zip files into a same directory
  • ex: $HOME/Downloads/instantclient_12_1
  1. Create install.sh inside this instantclient_12_1 folder and copy the following code and past it on that file.
@NapoleonWils0n
NapoleonWils0n / virtualbox_command_line.sh
Created November 11, 2012 20:22
macosx: VirtualBox command line
#!/bin/sh
# VirtualBox command line
#|------------------------------------------------------------------------------
#| start virtual machine from the command line
#|------------------------------------------------------------------------------
VBoxManage startvm virtualMachineName