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
1) Download GCC 4.9.2 MinGW (DW2) - 32-bit from http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.2/threads-posix/dwarf/i686-4.9.2-release-posix-dwarf-rt_v3-rev0.7z/download (via http://stackoverflow.com/a/28011978) | |
- Extract to C:\dev_resources\mingw32-4.9.2 | |
2) Download SFML 2.3.2 for GCC 4.9.2 MinGW (DW2) - 32-bit at http://www.sfml-dev.org/download/sfml/2.3.2/ | |
- Extract to C:\dev_resources\SFML-2.3.2_GCC-4.9.2 | |
3) Save compile.bat from this gist into your source directory where main.cpp is | |
4) (For now) copy "libstdc++-6.dll" from "C:\dev_resources\mingw32-4.9.2\bin\libstdc++-6.dll" into source directory where compile.bat is | |
5) Run compile.bat in CMD |
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 <SFML/Graphics.hpp> | |
#include <iostream> | |
#include <stdlib.h> | |
int main(int argc, char **argv) { | |
sf::RenderWindow window(sf::VideoMode(800, 600), "test"); | |
sf::CircleShape circle(100.f); | |
circle.setFillColor(sf::Color::Green); |
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 | |
SOURCE_FILE=$1 | |
if [[ -z "$SOURCE_FILE" ]]; then | |
SOURCE_FILE="main" | |
fi | |
if [[ ! -f "$SOURCE_FILE.cpp" ]]; then | |
echo "!! $SOURCE_FILE.cpp not found, exiting..." |
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 $height = (!empty($_REQUEST['height'])?$_REQUEST['height']:128); ?><style type="text/css"> | |
.image { width: 2px; float: left; background-image: url('http://media.dinnerbone.com/uploads/2015-05/screenshots/04_15-51-30_LLw4sOTM2a.png'); background-position: 0 0; } | |
</style> | |
<p><a href="?height=<?=($height-1);?>">Less</a> | <?=$height;?> | <a href="?height=<?=($height+1);?>">More</a></p> | |
<div style="display: table; width: 100%; height: <?=$height;?>px;"><?php | |
for($i = 1; $i <= 427; $i++) { ?><div class="image" style="height: <?=$height;?>px; background-position: 0 -<?=($height * ($i - 1));?>px;"></div><?php } | |
?></div> |
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 | |
# /etc/init.d/minecraft | |
# version 0.5.0 2015-04-20 (YYYY-MM-DD) | |
# | |
### BEGIN INIT INFO | |
# Provides: minecraft | |
# Required-Start: $local_fs $remote_fs screen-cleanup | |
# Required-Stop: $local_fs $remote_fs | |
# Should-Start: $network | |
# Should-Stop: $network |
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 | |
set_time_limit(0); | |
ini_set('memory_limit', "1024M"); | |
// encoding settings | |
try { | |
setlocale(LC_ALL, 'en_US.UTF8'); | |
mb_internal_encoding("UTF-8"); | |
} catch(Exception $e) { die("Unable to set local/internal encoding"); } | |
NewerOlder