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 | |
include(dirname(__DIR__) . '/vendor/autoload.php'); | |
$server = new Hoa\Socket\Server('udp://0.0.0.0:3655'); | |
$server->connectAndWait(); | |
$server->considerRemoteAddress(true); | |
do { | |
$line = bin2hex($server->read(32)); | |
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 | |
{ | |
class Foo | |
{ | |
public function get() | |
{ | |
$string = 'foobarbaz'; |
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
{ | |
"links": { | |
"self": "/examples/collection_advanced.php" | |
}, | |
"data": [ | |
{ | |
"type": "user", | |
"id": "USER-A", | |
"attributes": { | |
"firstname": "John", |
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/sh | |
### BEGIN INIT INFO | |
# Provides: isso | |
# Required-Start: $local_fs $network | |
# Required-Stop: $local_fs $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Description: lightweight Disqus alternative | |
### END INIT INFO |
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 | |
$dir = __DIR__; | |
do { | |
echo $dir, "\n"; | |
$dirParent = dirname($dir); |
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
app: | |
image: nginx | |
ports: | |
- "8084:443" | |
volumes: | |
- .:/app | |
- ./config/nginx.conf:/etc/nginx/nginx.conf | |
links: | |
- php |
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 | |
/** | |
* Like class is single, specify DIRECTIVE seems not be mandatory | |
*/ | |
class Single extends ObjectivePHP\Config\SingleValueDirective {} | |
$config->import(new Single('x')) | |
->import(new Single('y')); | |
$config->get(Single::class) == "y"; |
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 class Zafrira_Storepickup_Helper_Data extends Mage_Core_Helper_Abstract | |
{ | |
public function isFreeMethod($method, $storeId = null) | |
{ | |
$arr = explode('_', $method, 2); | |
if (!isset($arr[1])) { | |
return false; | |
} | |
$freeMethod = Mage::getStoreConfig('carriers/' . $arr[0] . '/free_method', $storeId); |
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/env bash | |
for (( ; ; )) | |
do | |
iwconfig wlan0 | grep -i --color quality | |
ping free.fr -c 4 | tail -1 | awk '{print $4}' | cut -d '/' -f 2 | |
ping fritz.box -c 4 | tail -1 | awk '{print $4}' | cut -d '/' -f 2 | |
sleep 1 | |
done |
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/sh | |
myWifiPassword() { | |
SSID=`iwgetid -r` | |
FILE=/etc/NetworkManager/system-connections/$SSID | |
if [ ! -f "$FILE" ]; | |
then | |
FILE="/etc/NetworkManager/system-connections/Auto $SSID" | |
fi |
OlderNewer