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
#!/usr/bin/bash | |
modprobe tpm_vtpm_proxy | |
rm -rf /tmp/vtpm.state /tmp/vtpm.* | |
mkdir -p /tmp/vtpm.state | |
swtpm chardev --vtpm-proxy --tpmstate dir=/tmp/vtpm.state --tpm2 --ctrl type=tcp,port=2322 --log file=/tmp/vtpm.log,level=2 >/tmp/vtpm.out & | |
trap "kill %%" SIGINT EXIT | |
for i in {1..5}; do | |
[[ -s /tmp/vtpm.out ]] && break | |
echo "waiting for swtpm to be ready" |
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
[stepper_x] | |
step_pin: PB3 | |
dir_pin: PB4 | |
enable_pin: !PB0 | |
step_distance: .005 | |
endstop_pin: !PB15 | |
position_endstop: -32 | |
position_max: 220 | |
position_min: -32 | |
homing_speed: 50 |
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
fn is_vowel(c: char) -> bool { | |
let vocals = ['a', 'o', 'i', 'u', 'e', 'A', 'O', 'I', 'U', 'E']; | |
vocals.contains(&c) | |
} | |
fn pig_latin(input: &str) -> String { | |
let mut output = String::new(); | |
for word in input.split_whitespace() { | |
if let Some(c) = word.chars().next() { | |
if is_vowel(c) { |
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
use std::collections::HashMap; | |
fn mean_median_mode(nums: &[i32]) -> (i32, i32, i32) { | |
let mut numbers = Vec::from(nums); | |
numbers.sort(); | |
let median = numbers[numbers.len() / 2]; | |
let mut sum = 0; | |
for num in &numbers { | |
sum += *num; |
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
From c4da94d9dc105a7ab8d9883898837ff7ad001c57 Mon Sep 17 00:00:00 2001 | |
From: Grigori Goronzy <greg@chown.ath.cx> | |
Date: Mon, 7 Sep 2015 11:15:15 +0200 | |
Subject: [PATCH] DO NOT MERGE: horrible hacky fontconfig match_fonts | |
--- | |
libass/ass_fontconfig.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++++- | |
1 file changed, 83 insertions(+), 1 deletion(-) | |
diff --git a/libass/ass_fontconfig.c b/libass/ass_fontconfig.c |
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
From 9bf3b2082f1b8d5043e72d457cc4517b13177d13 Mon Sep 17 00:00:00 2001 | |
From: Grigori Goronzy <greg@chown.ath.cx> | |
Date: Thu, 19 Jun 2014 13:54:21 +0200 | |
Subject: [PATCH] R600/SI: implement range reduction for sin/cos | |
These instructions can only take a limited input range, and return | |
the constant value 1 out of range. We should do range reduction to | |
be able to process arbitrary values. Use a FRACT instruction after | |
normalization to achieve this. |
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
From 9bf3b2082f1b8d5043e72d457cc4517b13177d13 Mon Sep 17 00:00:00 2001 | |
From: Grigori Goronzy <greg@chown.ath.cx> | |
Date: Thu, 19 Jun 2014 13:54:21 +0200 | |
Subject: [PATCH] R600/SI: implement range reduction for sin/cos | |
These instructions can only take a limited input range, and return | |
the constant value 1 out of range. We should do range reduction to | |
be able to process arbitrary values. Use a FRACT instruction after | |
normalization to achieve this. |
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
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c | |
index 6bc89ab..325741b 100644 | |
--- a/src/gallium/drivers/radeonsi/si_blit.c | |
+++ b/src/gallium/drivers/radeonsi/si_blit.c | |
@@ -500,6 +500,16 @@ static void si_reset_blittable_to_orig(struct pipe_resource *tex, | |
rtex->mipmap_shift = 0; | |
} | |
+static bool util_format_is_subsampled_2x1_32bpp(enum pipe_format format) | |
+{ |
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
// compile with gcc -o gs gs.c -lGL -lGLEW -lglut | |
#include <GL/glew.h> | |
#include <GL/glut.h> | |
#include <GL/freeglut_ext.h> | |
#include <stdio.h> | |
// Shader macro | |
#define GLSL(src) "#version 150 core\n" #src | |
// Vertex shader |
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 <GL/glew.h> | |
#include <GL/glut.h> | |
#include <GL/freeglut_ext.h> | |
#include <stdio.h> | |
// Shader macro | |
#define GLSL(src) "#version 150 core\n" #src | |
// Vertex shader | |
const GLchar* vertexShaderSrc = GLSL( |
NewerOlder