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
#!/bin/bash | |
INPUT_DIR=~/.xonotic/data | |
OUTPUT_DIR=$(pwd) | |
# @brief Prints a list of files in a pk3 | |
# @param $1 pk3 name | |
function pk3_files() |
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
#!/bin/bash | |
SERVER='localhost' | |
PORT='26000' | |
PASSWORD='foo' | |
SECURE=0 | |
SECURE_PORT="1234" | |
RCON_HEADER=$(echo -e "\xff\xff\xff\xff") | |
ESCAPE_CHAR=$(echo -en "\x1b") |
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 <iostream> | |
#include <map> | |
#include <functional> | |
#include <sstream> | |
namespace misc { | |
/** | |
* \brief Abstract class for classes that have some way to access properties | |
* |
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
<?php | |
/** | |
* \file | |
* \brief Simple web script to get colorful text in Xonotic | |
* \par Basic Usage | |
* \code menu_cmd qc_curl --exec http://localhost/this_script.php cmd echo c1 000 c2 fff text "Hello world" \endcode | |
* \par Example with aliases | |
\code | |
set mb_net_chat_server "http://localhost/xonchat/index.php" | |
alias mb_net_chat "menu_cmd qc_curl --exec $mb_net_chat_server cmd \"$1\" c1 $2 c2 $3 text \"$mb_net_str\"" |
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
#!/bin/bash | |
function read_config() | |
{ | |
if [ -z "$2" ] | |
then | |
read -r -d '' $1 | |
else | |
local input="" | |
for inp in "${@:2}" |
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
/** | |
* \file | |
* \brief An example of conversions of run-time value to compile-time objects used in function calls | |
*/ | |
#include <iostream> | |
#include <vector> | |
#include <stdexcept> | |
#include <type_traits> |
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
/** | |
* \file | |
* | |
* \author Mattia Basaglia | |
* | |
* \copyright Copyright (C) 2015 Mattia Basaglia | |
* | |
* 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 |
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/env bash | |
DIRECTORY="$PWD" | |
[ "$1" ] && DIRECTORY="$1" | |
selected="$(ls "$DIRECTORY" | sort -R | head -n 1)" | |
[ "$selected" ] || exit 1 | |
xdg-open "$selected" && rm "$selected" |
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
import urllib | |
import json | |
import random | |
class PonyList(object): | |
api_url = "http://mlp.wikia.com/api.php" | |
query_common = { | |
"action": "query", | |
"list": "categorymembers", | |
"format": "json", |
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 <cmath> | |
#include <limits> | |
#include <iostream> | |
#include "melanolib/math/math.hpp" | |
using namespace melanolib; | |
template<class Float> | |
std::string float_to_string(Float value) |
OlderNewer