Did you know that it is rather easy to setup a VM to test your NixOs configuration?
# flake.nix
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
import asyncio | |
import psycopg2 | |
# dbname should be the same for the notifying process | |
conn = psycopg2.connect(host="localhost", dbname="example", user="example", password="example") | |
conn.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT) | |
cursor = conn.cursor() | |
cursor.execute(f"LISTEN match_updates;") |
# First add this module to your /etc/nixos/configuration.nix | |
# ... | |
# imports = [ /path/to/iphone.nix ]; | |
# iphone.enable = true; | |
# iphone.user = "yourusername"; | |
# ... | |
# Then rebuild system. Attach iPhone via cable, open terminal and run command `iphone` | |
# It will fail, but there will occure a dialog on your iPhone to "trust this computer" | |
# Press OK there and run `iphone` again. If it succeeds it will open a freshly mounted folder |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
I've been looking for the best Linux backup system, and also reading lots of HN comments.
Instead of putting pros and cons of every backup system I'll just list some deal-breakers which would disqualify them.
Also I would like that you, the HN community, would add more deal breakers for these or other backup systems if you know some more and at the same time, if you have data to disprove some of the deal-breakers listed here (benchmarks, info about something being true for older releases but is fixed on newer releases), please share it so that I can edit this list accordingly.
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict | |
This file remaps the key bindings of a single user on Mac OS X 10.5 to more | |
closely match default behavior on Windows systems. This makes the Command key | |
behave like Windows Control key. To use Control instead of Command, either swap | |
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys... | |
or replace @ with ^ in this file. | |
Here is a rough cheatsheet for syntax. | |
Key Modifiers |
This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
module Jekyll | |
class ArchivePage < Page | |
include Convertible | |
attr_accessor :site, :pager, :name, :ext, :basename, :dir, :data, :content, :output | |
# Initialize new ArchivePage | |
# +site+ is the Site | |
# +month+ is the month | |
# +posts+ is the list of posts for the month |
#!/usr/bin/env ruby | |
require 'faraday' | |
require 'json' | |
require 'gitlab' | |
module Redmine | |
Host = nil | |
APIKey = nil |
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |