View discord.msg.send.php
<?php | |
//======================================================================================================= | |
// Create new webhook in your Discord channel settings and copy&paste URL | |
//======================================================================================================= | |
$webhookurl = "YOUR_WEBHOOK_URL"; | |
//======================================================================================================= | |
// Compose message. You can use Markdown | |
// Message Formatting -- https://discordapp.com/developers/docs/reference#message-formatting |
View bootstrap.php
<?php | |
namespace Flarum\CustomLayout; | |
use Flarum\Support\Extension as BaseExtension; | |
use Illuminate\Events\Dispatcher; | |
use Flarum\Events\BuildClientView; | |
use Flarum\Forum\Actions\ClientAction as ForumClientAction; | |
class Extension extends BaseExtension |
View gpg
# Importer une clé | |
gpg --import [filename] | |
# Rechercher une clé depuis serveur distant | |
gpg --keyserver pgp.mit.edu --search-keys KEYID | |
# Importer une clé depuis un serveur distant | |
gpg --keyserver pgp.mit.edu --recv-keys KEYID | |
# Exporter une clé sur un serveur distant |
View createPhar.php
<?php | |
# Create an executable phar | |
# Name of our archive. | |
$phar = new Phar("myscript.phar"); | |
# Have to do buffering to make things executable. | |
# See http://stackoverflow.com/questions/11082337/how-to-make-an-executable-phar | |
$phar->startBuffering(); |
View scgi-server.php
<?php | |
/** | |
* Class: MyListener | |
* ============================================================================= | |
* This sets up the underlying socket server. | |
* Using all this nice new LibEvent code which is now part of PHP. | |
*/ | |
class MyListener | |
{ |
View rem-fallback.less
@main-font-size: 16px; | |
.x-rem (@property, @value) { | |
// This is a workaround, inspired by https://github.com/borodean/less-properties | |
@px-fallback: @value * @main-font-size; | |
-: ~`(function () { return ';@{property}: @{px-fallback}'; }())`; | |
-: ~`(function () { return ';@{property}: @{value}rem'; }())`; | |
} |
View md5.php
<?php | |
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ | |
/** | |
* MD5 hash lookup script that returns XML | |
* | |
* written by Ben Ramsey (ben at benramsey dot com) | |
* with code by Ilia Alshanetsky (ilia at ilia dot ws) | |
* | |
* Copyright (c) 2005, Ilia Alshanetsky | |
* Copyright (c) 2005, Ben Ramsey |
View SCGI.java
/* | |
Copyright (c) 2008 ArtemGr | |
Permission to use, copy, modify, and/or distribute this software for any | |
purpose with or without fee is hereby granted, provided that the above | |
copyright notice and this permission notice appear in all copies. | |
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |