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 | |
curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose | |
docker-compose --version |
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
/** | |
* Example usage: | |
Color *colors[100] = { | |
new Color(255,0,0), | |
new Color(0,255,0), | |
new Color(0,0,255) | |
}; | |
ColorLoop *loop = new ColorLoop(colors, 3, 50); |
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
.DEFAULT_GOAL := help | |
SHELL := /bin/sh | |
help: ## Display help message | |
@echo "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\1:\2/' | column -c2 -t -s :)" | |
venv: ## Create virtualenv if not exists | |
test -d .venv || python3 -m venv .venv | |
source: venv ## Source viirtualvenvv |
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
CXX := -c++ | |
CXXFLAGS := -pedantic-errors -Wall -Wextra -Werror | |
LDFLAGS := -L/usr/lib -lstdc++ -lm | |
BUILD := ./build | |
OBJ_DIR := $(BUILD)/objects | |
APP_DIR := $(BUILD)/apps | |
TARGET := thegame | |
INCLUDE := -Iinclude/ | |
SRC := \ | |
$(wildcard src/player/*.cpp) \ |
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 | |
$length = 32; | |
if ($argc > 1) { | |
$length = intval($argv[1]); | |
} | |
$token = ''; | |
$rand_length = 4; |
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 | |
find . -name 'insert_filename_pattern_here' -exec php update.php {} $1 $2 $3 $4 \; |
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 | |
if ($argc < 5) { | |
echo <<<EOF | |
Use: | |
php modify.php <filename> <variable> <from> <to> <backup> | |
EOF; | |
exit(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
<?php | |
namespace App\Command; | |
use Symfony\Component\Console\Command\Command; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use Symfony\Component\Console\Input\InputArgument; | |
use Symfony\Component\Console\Question\Question; |
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
validate () { | |
return new Promise((resolve, reject) => { | |
try { | |
// Local check | |
var file = this.findLicense() | |
if (!file) { | |
reject('License key not found') | |
} else { | |
var data = fs.readFileSync(file, 'utf8') |
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 | |
// to be put in phpmyadmin source root (eg: /usr/share/phpmyadmin) | |
error_reporting(E_NONE); | |
ini_set('display_errors',0); | |
ini_set('display_startup_errors',0); | |
$cfg['SendErrorReports'] = 'never'; |
NewerOlder