How to make your desktop open different URLs in different browsers, depending on the URL
-
vim ~/bin/open-the-right-browser
#!/bin/sh case "$1" in *git.example.com*) browser=firefox;; *) browser=chromium-browser;; esac
exec
fun! ToggleTerminal() | |
let terms = term_list() | |
if terms == [] " no terminals, open one | |
botright term | |
elseif bufwinnr(terms[0]) == -1 " terminal hidden, show it | |
exec 'botright sbuffer' terms[0] | |
else " terminal visible, hide it | |
exec bufwinnr(terms[0]) .. 'hide' | |
endif | |
endf |
use num_integer::lcm; | |
use std::cmp::Ordering; | |
use std::collections::{BinaryHeap, HashMap}; | |
#[derive(Copy, Clone)] | |
pub struct Pos { | |
x: usize, | |
y: usize, | |
} |
use lazy_static::lazy_static; | |
use num_enum::{IntoPrimitive, TryFromPrimitive}; | |
use num_integer::gcd; | |
use regex::Regex; | |
use std::collections::{HashMap, VecDeque}; | |
#[repr(u8)] | |
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] | |
pub enum Facing { | |
Right = 0, |
use std::collections::HashMap; | |
use num_rational::Rational64; | |
pub type Number = Rational64; | |
#[derive(Debug)] | |
pub enum Expr<'a> { | |
Unknown, | |
Number(Number), | |
Add(&'a str, &'a str), |
--- | |
- hosts: all | |
tasks: | |
- group_by: key="{{ 'using_letsencrypt' if letsencrypt_certs|default([]) else 'not_using_letsencrypt' }}" | |
changed_when: no | |
tags: always | |
- group_by: key="{{ ansible_distribution.lower() ~ '_' ~ ansible_distribution_release }}" | |
changed_when: no | |
tags: always |
import os | |
from units.compat import mock | |
from units.compat import unittest | |
from ansible.modules import apt_key | |
class AptKeyTestCase(unittest.TestCase): |
#!/usr/bin/python3 | |
""" | |
Script to remove unused libvirt images left lying around by libvirt-vagrant. | |
This is a workaround for | |
https://github.com/vagrant-libvirt/vagrant-libvirt/issues/85 | |
""" | |
import argparse | |
import functools |
# Put this in your top-level conftest.py | |
class XTermProgress: | |
def __init__(self, stdout=sys.stdout): | |
self.init(stdout) | |
self.session = None | |
self.reported = set() | |
self.args = [] |
auto lo | |
iface lo inet loopback | |
auto eth0 | |
iface eth0 inet static | |
address X.X.X.X | |
pointopoint X.X.X.Y | |
netmask 255.255.255.255 | |
gateway X.X.X.Y | |
dns-nameservers A.B.C.D A.B.C.E A.B.C.F |
How to make your desktop open different URLs in different browsers, depending on the URL
vim ~/bin/open-the-right-browser
#!/bin/sh
case "$1" in
*git.example.com*) browser=firefox;;
*) browser=chromium-browser;;
esac
exec