This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add the rpmfusion free & nonfree repos, if needed | |
rpm-ostree install -A https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \ | |
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm | |
# apply the changes, or reboot into the new version. | |
sudo rpm-ostree apply-live --allow-replacement | |
# try to install steam | |
rpm-ostree install -A steam | |
# but it fails: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
code () { | |
local script=$(echo ~/.vscode-server/bin/*/bin/code(*ocNY1)) | |
if [[ -z ${script} ]] | |
then | |
echo "VSCode remote script not found" | |
exit 1 | |
fi | |
local socket=$(echo /run/user/$UID/vscode-ipc-*.sock(=ocNY1)) | |
if [[ -z ${socket} ]] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type piece interface { | |
Write(wr io.Writer) | |
} | |
type stringPiece string | |
func (sp stringPiece) Write(wr io.Writer) { | |
fmt.Fprint(wr, string(sp)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stating a bunch of files in a git repo fails in a weird way. | |
It doesn't fail every time but in my checkout of https://github.com/git/git it fails about 30% of the time. | |
I invoke: | |
git ls-files | strace -o /tmp/stat-many.strace ~/Projects/git-dirty/stat-many $PWD | |
I have attached a failing strace. | |
I'm running a 5.7.17 kernel on amd64 with liburing 0.7 from Debian. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOCATE COMP "CLK" SITE "A9"; | |
IOBUF PORT "CLK" IO_TYPE=LVCMOS33; | |
LOCATE COMP "LED1" SITE "K4"; | |
LOCATE COMP "LED2" SITE "M3"; | |
LOCATE COMP "LED3" SITE "J3"; | |
IOBUF PORT "LED1" IO_TYPE=LVCMOS33; | |
IOBUF PORT "LED2" IO_TYPE=LVCMOS33; | |
IOBUF PORT "LED3" IO_TYPE=LVCMOS33; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import typing, math | |
from nmigen import * | |
from nmigen.build import Platform | |
from nmigen.back.pysim import Simulator, Delay | |
class Pulse(Elaboratable): | |
def __init__(self, | |
frequency: float, | |
clock_frequency: typing.Optional[float], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $# -lt 2 ]]; then | |
echo "Usage: $0 <depfile> <command...>" >&2 | |
exit 1 | |
fi | |
# The .d file we're going to write. | |
DEPSFILE=$1 | |
shift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CFLAGS=$(shell pkg-config --cflags fontconfig) | |
LDFLAGS=$(shell pkg-config --libs fontconfig) | |
example: example.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>No Tunnel</title> | |
</head> | |
<body> | |
<h1>No Tunnel</h1> | |
<p>There is no tunnel configured for <i><script>document.write(location.host)</script></i>...</p> | |
<p>Create a tunnel with: | |
<code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <vector> | |
void test_string_vector() { | |
std::vector<std::string> v; | |
const char* one = v.emplace_back("one").data(); | |
std::cout << "added one" << std::endl; | |
std::cout << "v.capacity() = " << v.capacity() << std::endl; |
NewerOlder