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/python | |
import sys, os; | |
from path import path; | |
from datetime import datetime; | |
if len(sys.argv) < 2: | |
print('Usage: listIds.py <configDirectory> [reportFile] [lineBreaksInReportFile] [debugLevel]'); | |
print(''); | |
print('reportFile: a path where the report will be stored. If it is blank, the report will be saved in a file called report, in the config directory.'); |
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
/** | |
* Returns a boolean from an entered string, or null if the string does not represent a boolean. | |
* | |
* "on", "yes", "y", "true" = true | |
* "off", "no", "n", "false" = false | |
* | |
* @param input the input text. | |
* @return true/false if the string is a boolean; null else. | |
*/ | |
public Boolean getBooleanFromString(String input) { |
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
// ==UserScript== | |
// @name Chat intégré sur le forum | |
// @namespace eu.carrade.amaury.zcraft.chat | |
// @description Intégration d'un accès à IRC sur le forum | |
// @include https://forum.zcraft.fr/* | |
// @version 2 | |
// @grant none | |
// ==/UserScript== | |
var chat_url = "https://kiwiirc.com/client/irc.zcraft.fr/?&theme=mini#zcraft"; |
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 | |
use Symfony\Component\HttpFoundation\Response; | |
$app->get("/tools/minecraft/history", function() use($app) | |
{ | |
$user = isset($_GET["user"]) ? trim($_GET["user"]) : ""; | |
$valid = true; | |
$emptyHistory = false; | |
$data = array(); | |
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 | |
// src/Zm/UserBundle/Entity/User.php | |
namespace Zm\UserBundle\Entity; | |
use FOS\UserBundle\Entity\User as BaseUser; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity |
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 | |
// Session management | |
# Get session for an easier access | |
$session = $_SESSION[$settings['session']]; | |
$datetime = new \Datetime(); | |
# Saving current page in session history | |
$session['history'][] = array( | |
'page' => $dump->url, |
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 | |
// Blabla | |
public function ChangeLanguageAction() | |
{ | |
$request = $this->get('request'); | |
$language = $request->query->get('language'); | |
$userManager = $this->get('fos_user.user_manager'); |
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
{% for key, val in app.sessio %} | |
{{ key }} => {{ val }} <br /> | |
{% else %} | |
Rien à lister | |
{% endfor %} |
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
{% for key, flash in app.session.get('flashes') %} | |
{# Affichage #} | |
{{ app.session.set('flashes', '') }} | |
{% endfor %} |
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
{% set var = '' %} | |
{% if var is not null %} | |
<h1>It's work!</h1> | |
<!-- N'y voit pas de référence à une tribu. Non non. --> | |
{% endif %} |
OlderNewer