Enable persistent user systemd services
loginctl enable-linger $userCreate a user systemd directory
mkdir ~/.config/systemd/user| { | |
| "sort": ["_doc"], | |
| "size": 100, | |
| "query": { | |
| "bool": { | |
| "must": { | |
| "match_all": {} | |
| }, | |
| "filter": { | |
| ... |
| use std::path::{Path, PathBuf}; | |
| struct Model { | |
| u: f32, | |
| } | |
| fn texture_fname(path: &Path) -> PathBuf { | |
| let fullname = format!("{}{}", path.file_stem().unwrap().to_str().unwrap(), "_diffuse"); | |
| let mut buf = PathBuf::from(path); |
As soon as I saw the new YouTube Player and its new morphing play/pause button, I wanted to understand how it was made and replicate it myself.
From my analysis it looks like YouTube is using [SMIL animations][1]. I could not get those animations to work on browsers other than Chrome and it appears [that they are deprecated and will be removed][2]. I settled for the following technique:
Define the icon path elements inside a defs element. These paths are not drawn.
Draw one icon by definining a use element whose xlink:href attribute points to one of the icons. Simply [changing this attribute to point to the other icon is enough to swap them out][3], but this switch is not animated. To do that,
Substitute the use for the actual path when the page is loaded.
| #![allow(unused_variables)] | |
| #![allow(unused_imports)] | |
| use std::env; | |
| use std::process; | |
| use std::thread; | |
| use std::io::{self, Read, Write, Error}; | |
| use std::net::TcpStream; | |
| use std::net::TcpListener; |
#Postgres
##Create Postgres Dockerfile
#create fresh postgres image
docker build -t postgres .| // just include d3js and add animaDur in ms to marker's option | |
| L.SVG.prototype._setPath = function(layer,path){ | |
| if(layer.options.animaDur) | |
| d3.select(layer._path).transition().duration(layer.options.animaDur).ease('linear').attr('d',path) | |
| else | |
| layer._path.setAttribute('d', path); | |
| } |
| /* Copyright (C) 2017 Andrew Ayer | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a | |
| * copy of this software and associated documentation files (the "Software"), | |
| * to deal in the Software without restriction, including without limitation | |
| * the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
| * and/or sell copies of the Software, and to permit persons to whom the | |
| * Software is furnished to do so, subject to the following conditions: | |
| * | |
| * The above copyright notice and this permission notice shall be included |
| /* | |
| * Demonstrates that an RSA signature does not uniquely identify a public key. | |
| * Given a signature, s, and a message m, it's possible to construct a new RSA key | |
| * pair such that s is a valid signature for m under the new key pair. | |
| * | |
| * Requires Go version >= 1.5. Go <= 1.4 doesn't work due to a bug in the bignum | |
| * package: https://github.com/golang/go/issues/9826 | |
| * | |
| * Written in 2015 by Andrew Ayer <agwa@andrewayer.name> | |
| * |
| /* | |
| * Demonstrates that LibreSSL's PRNG is not fork-safe on Linux. | |
| * See https://www.agwa.name/blog/post/libressls_prng_is_unsafe_on_linux | |
| * This code is in the public domain. | |
| */ | |
| #include <openssl/rand.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> |