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"); } | |
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 $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 | |
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
#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
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
# http://bashrcgenerator.com | |
export PS1="\[\033[38;5;7m\][\[$(tput sgr0)\]\[\033[38;5;229m\]\u\[$(tput sgr0)\]\[\033[38;5;249m\]@\[$(tput sgr0)\]\[\033[38;5;51m\]\h\[$(tput sgr0)\]\[\033[38;5;7m\]]\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;39m\]\w\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;15m\]\n\[$(tput sgr0)\]\[\033[38;5;245m\]\\$\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]" |
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
function parse_git_repo { | |
local repo_path=$(git rev-parse --show-toplevel 2>/dev/null) | |
[[ ! -z "$repo_path" ]] && basename $repo_path | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' | |
} |
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 | |
CWD=$(pwd) | |
ARROW="-" | |
echo "" | |
echo "====================================" | |
echo "== Finding: $1" | |
echo "== - in: $CWD/" | |
echo "== - skipping paths that match '_old/|CST$'" |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Blurred Background Image</title> | |
<style type="text/css"> | |
body { | |
overflow: hidden; | |
} | |
.blur_background_container { |
OlderNewer