Skip to content

Instantly share code, notes, and snippets.

View svenstaro's full-sized avatar

Sven-Hendrik Haase svenstaro

View GitHub Profile
#!/usr/bin/python
#
# Awesome random theme chooser for Reddit Game Jam 01
#
import random
themes = ["pairs", "repeating cycle", "stamina", "paralysis", "paranoia",
"tunneling", "multi-dimension", "hunger", "flight", "season", "time", "love",
"storm", "beauty/ugliness", "metamorphosis", "evolution", "distance", "empathy",
#include <SFML/Window.hpp>
#include <iostream>
int main() {
size_t windowHnd = 0;
MyOgreWin->getCustomAttribute("WINDOW", &windowHnd);
sf::Window MyWindow(windowHnd);
const sf::Input& MyInput = MyWindow.GetInput();
while(true) {
#!/bin/bash
chrootdir='/var/mychroots'
chrootname=('stable32' 'stable64')
targetarch=('linux32' 'linux64')
packager="Thomas Dziedzic < gostrc at gmail >"
makeflags="-j9"
@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}
#!/usr/bin/env python2
# -*- coding: cp1252 -*-
import random
leute=["svenstaro","spielepetie","matjhew","carboxl","kryptonbrand",
"bbqbob","jtvennox","timesqueezer","arthimis","zlox"]
random.shuffle(leute)
impl<T> HasBoundingVolume<T> for Player {
fn bounding_volume(&self) -> BoundingVolume {
self.shape.aabb(self.position)
}
}
pub fn update(&mut self, args: &UpdateArgs) {
for &mut position in self.positions.iter() {
position.append_translation(&Vec2::new(50f64, 0.0));
}
}
# core framework
uwsgi
flask
# flask extensions
flask-mail
flask-migrate
flask-oauthlib
flask-script
flask-scrypt
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
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')