Skip to content

Instantly share code, notes, and snippets.

@progval
progval / build.py
Last active October 11, 2015 15:37
Limnoria nightly build script
#!/usr/bin/env python
from __future__ import with_statement
import pbs
import time
import glob
import requests
ROOT = '/home/compiler/Limnoria'
# -*- coding: utf-8 -*-
#
# Copyright (c) 2009 by xt <xt@bash.no>
# Copyright (c) 2013 by Valentin Lorentz
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
@progval
progval / history.py
Created July 25, 2013 19:32
Limited-length sorted list.
import bisect
import operator
import unittest
class history:
"""Limited-length sorted list."""
def __init__(self, maxlen):
self._maxlen = maxlen
self._list = []
def __repr__(self):
@progval
progval / infc.sh
Last active March 29, 2018 21:42
Script to run the Official Infclass servers
#!/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"
@progval
progval / main.rs
Created June 19, 2018 23:17 — forked from Yatekii/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 {
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):
@progval
progval / mindustry_log.patch
Last active February 23, 2020 21:16
Mindustry log builds
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);
@progval
progval / selectLlvm.patch
Created April 19, 2020 12:23
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;
[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-
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'