Skip to content

Instantly share code, notes, and snippets.

View fix-apache-wave.patch
diff --git a/pst/build.gradle b/pst/build.gradle
index 9b4dc857..9eb8aa44 100644
--- a/pst/build.gradle
+++ b/pst/build.gradle
@@ -109,7 +109,7 @@ checkstyleMain.source = "src/main/java" // only checks the manually written java
//=============================================================================
protobuf {
protoc {
- artifact = 'com.google.protobuf:protoc:2.6.1'
+ path = '/home/wave-sandbox/.local/bin/protoc'
View gist:ab6b6bfa69a8accfb9ff34367b0a158f
[nix-shell:~/nixpkgs/source]$ tools/bin/minicargo rustc-1.29.0-src/src/vendor/libssh2-sys/ --vendor-dir rustc-1.29.0-src/src/vendor/ --output-dir output/cargo-build -L output/
(0/7) BUILDING cc v1.0.18
> /home/val/nixpkgs/source/bin/mrustc rustc-1.29.0-src/src/vendor/cc/src/lib.rs -o output/cargo-build/libcc-1_0_18.rlib --crate-name cc --crate-type rlib -C emit-depfile=output/cargo-build/libcc-1_0_18.rlib.d --crate-tag 1_0_18 -g --cfg debug_assertions -O -L output -L output/cargo-build
(1/7) BUILDING cmake v0.1.31
> /home/val/nixpkgs/source/bin/mrustc rustc-1.29.0-src/src/vendor/cmake/src/lib.rs -o output/cargo-build/libcmake-0_1_31.rlib --crate-name cmake --crate-type rlib -C emit-depfile=output/cargo-build/libcmake-0_1_31.rlib.d --crate-tag 0_1_31 -g --cfg debug_assertions -O -L output -L output/cargo-build --extern cc=output/cargo-build/libcc-1_0_18.rlib
(2/7) BUILDING pkg_config from pkg-config v0.3.11
> /home/val/nixpkgs/source/bin/mrustc rustc-1.29.0-src/src/vendor/pkg-config/src/lib.rs -o output/cargo-
View selectLlvm.patch
diff --git a/pkgs/development/compilers/rust/1_29.nix b/pkgs/development/compilers/rust/1_29.nix
index ba76e6555ce..d0a494b03af 100644
--- a/pkgs/development/compilers/rust/1_29.nix
+++ b/pkgs/development/compilers/rust/1_29.nix
@@ -11,7 +11,7 @@ import ./default.nix {
rustcVersion = "1.29.0";
rustcSha256 = "1sb15znckj8pc8q3g7cq03pijnida6cg64yqmgiayxkzskzk9sx4";
- llvm = llvm_7;
+ selectLlvm = pkgs: pkgs.llvm_7;
@ProgVal
ProgVal / mindustry_log.patch
Last active Feb 23, 2020
Mindustry log builds
View mindustry_log.patch
diff --git a/core/src/mindustry/graphics/MinimapRenderer.java b/core/src/mindustry/graphics/MinimapRenderer.java
index c34bb246e..84a8b8d5e 100644
--- a/core/src/mindustry/graphics/MinimapRenderer.java
+++ b/core/src/mindustry/graphics/MinimapRenderer.java
@@ -92,9 +92,13 @@ public class MinimapRenderer implements Disposable{
float rx = !withLabels ? (unit.x - rect.x) / rect.width * w : unit.x / (world.width() * tilesize) * w;
float ry = !withLabels ? (unit.y - rect.y) / rect.width * h : unit.y / (world.height() * tilesize) * h;
- Draw.mixcol(unit.getTeam().color, 1f);
+ Draw.color(unit.getTeam().color);
View rule90.rs
#![recursion_limit="1024"]
macro_rules! rule90 {
// Initialization
( ($($fuel:tt)*) | $($cells:tt,)* ) => {
rule90!( __cont ($($fuel)*) | ($($cells,)*) | (()) );
};
// Initialize the line
( __cont (f $($fuel:tt)*) | ($($cells:tt,)*) | ($(($($history:tt,)*))* ) ) => {
View reconnect_thread.diff
diff --git a/src/drivers/Socket.py b/src/drivers/Socket.py
index c9e9d19f..08787fb4 100644
--- a/src/drivers/Socket.py
+++ b/src/drivers/Socket.py
@@ -223,7 +223,13 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
def connect(self, **kwargs):
self.reconnect(reset=False, **kwargs)
- def reconnect(self, wait=False, reset=True):
+ def reconnect(self, **kwargs):
View main.rs
use nom::types::CompleteStr;
use std::str;
use nom::space;
use nom::types::CompleteByteSlice;
//use geometry::SchemaPoint2D;
pub struct SchemaPoint2D(f32, f32);
impl SchemaPoint2D {
fn new(x:f32, y:f32) -> SchemaPoint2D {
@ProgVal
ProgVal / infc.sh
Last active Mar 29, 2018
Script to run the Official Infclass servers
View infc.sh
#!/bin/sh
NUM=$1
PORT=$2
MYSQL_HOST=${MYSQL_HOST:-192.168.2.1}
DIR=/home/official-infclass/teeworlds-infclass
FNCFG=$DIR/config/tw06-infclass$NUM.cfg
FNGDB=$DIR/config/tw06-infclass$NUM.gdb
FNLOG=$DIR/logs/tw06-infclass$NUM-$(date +"%y-%m-%d-%T").txt
PARAM="-f $FNCFG"
View keybase.md

Keybase proof

I hereby claim:

  • I am ProgVal on github.
  • I am progval (https://keybase.io/progval) on keybase.
  • I have a public key whose fingerprint is 3790 43E3 DF96 D323 7E67 82AC 0E08 2B40 E437 6B1E

To claim this, I am signing this object:

View I2C.py
import smbus
import time
# for RPI version 1, use "bus = smbus.SMBus(0)"
bus = smbus.SMBus(1)
# This is the address we setup in the Arduino Program
address = 0x04
def writeNumber(value):
bus.write_byte(address, value)