Skip to content

Instantly share code, notes, and snippets.

View svenstaro's full-sized avatar

Sven-Hendrik Haase svenstaro

View GitHub Profile
struct Camera {
glm::vec3 pos;
glm::vec3 dir;
glm::vec3 up;
float fov;
float near_plane_dist;
float far_plane_dist;
};
m_camera = Camera{{0, 0, 0}, {0, 1, 0}, {0, 0, 1}, 45.f, 0.1f, 100.f};
GLOB sdist-make: /home/svenstaro/prj/marshmallow/setup.py
py26 create: /home/svenstaro/prj/marshmallow/.tox/py26
ERROR: InterpreterNotFound: python2.6
py27 inst-nodeps: /home/svenstaro/prj/marshmallow/.tox/dist/marshmallow-1.0.1.zip
py27 runtests: PYTHONHASHSEED='2556491626'
py27 runtests: commands[0] | flake8 .
py27 runtests: commands[1] | /home/svenstaro/prj/marshmallow/.tox/py27/bin/python setup.py test
running test
running egg_info
writing top-level names to marshmallow.egg-info/top_level.txt
def verify_recaptcha(challenge, response, private_key, remote_ip):
payload = {
"privatekey": private_key,
"remoteip": remote_ip,
"challenge": challenge,
"response": response
}
resp = requests.post("https://www.google.com/recaptcha/api/verify", data=payload)
resp_data = resp.text.splitlines()
return resp.status_code == requests.codes.ok and (resp_data[0] == 'true')
Detected Lua 5.1 library at /usr/lib/liblua.so.5.1.5
Eluant.dll.config has been created successfully.
CSC fixheader.exe
CSC OpenRA.Game.exe
OpenRA.Game/Exts.cs(378,6): error CS1525: Unexpected symbol `?'
Compilation failed: 1 error(s), 0 warnings
Makefile:249: recipe for target 'OpenRA.Game.exe' failed
make: *** [OpenRA.Game.exe] Error 1
# core framework
uwsgi
flask
# flask extensions
flask-mail
flask-migrate
flask-oauthlib
flask-script
flask-scrypt
pub fn update(&mut self, args: &UpdateArgs) {
for &mut position in self.positions.iter() {
position.append_translation(&Vec2::new(50f64, 0.0));
}
}
impl<T> HasBoundingVolume<T> for Player {
fn bounding_volume(&self) -> BoundingVolume {
self.shape.aabb(self.position)
}
}
#!/usr/bin/env python2
# -*- coding: cp1252 -*-
import random
leute=["svenstaro","spielepetie","matjhew","carboxl","kryptonbrand",
"bbqbob","jtvennox","timesqueezer","arthimis","zlox"]
random.shuffle(leute)
@svenstaro
svenstaro / CMakeLists.txt
Created June 22, 2011 07:14
minimal CMake example
cmake_minimum_required(VERSION 2.8.0)
project(example-project)
aux_source_directory(src/ sources)
include_directories(src/)
add_executable(example
${sources}
#!/bin/bash
chrootdir='/var/mychroots'
chrootname=('stable32' 'stable64')
targetarch=('linux32' 'linux64')
packager="Thomas Dziedzic < gostrc at gmail >"
makeflags="-j9"