Skip to content

Instantly share code, notes, and snippets.

WLAN:
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 170 MBytes 142 Mbits/sec
WLAN via AC:
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 681 MBytes 571 Mbits/sec
Gbit Ethernet:
[ ID] Interval Transfer Bandwidth
@nadar
nadar / PostMessageToSlackChannel.php
Last active June 5, 2024 17:05
Post a message to a slack channel with PHP
<?php
/**
* Send a Message to a Slack Channel.
*
* In order to get the API Token visit:
*
* 1.) Create an APP -> https://api.slack.com/apps/
* 2.) See menu entry "Install App"
* 3.) Use the "Bot User OAuth Token"
@nadar
nadar / callMethodSanitizeArguments.php
Last active November 12, 2015 11:36
Call class/object method and sanitize massive assigned arguments in PHP
<?php
/**
* Call a class method with arguments and verify the arguments if they are in the list of
* method arguments or not.
*
* ```
* $response = ObjectHelper::callMethodSanitizeArguments((new MyClass()), 'methodToGet', ['paramName' => 'paramValue']);
* ```
*
@nadar
nadar / luyacheck.php
Last active January 14, 2017 08:58
Retrieve debugging informations of a LUYA Webserver.
<?php
/**
* Return debugging information of a Webserver.
*
* Store the file `luyacheck.php` on your webserver and open it via Browser Url or run in console with `php luyacheck.php`.
*
* @see https://luya.io
* @see https://github.com/luyadev/luya
*/
@nadar
nadar / screen.sh
Last active May 19, 2016 08:40
Screen Short Guide
## https://www.howtoforge.com/linux_screen
## create new screen
screen
## list screens
screen -ls
## connect to a screen
screen -r 123....
@nadar
nadar / Windows 10 Linux Subsystem Setup.md
Last active August 4, 2017 11:53
Windows 10 Linux Subsystem and GitHub Setup

Aug, 2017 => https://insights.ubuntu.com/2017/08/03/upgrading-your-ubuntu-on-windows-install-to-the-app-version/

How to setup a Windows 10 Computer with Linux Subsystem, GitHub, Apache2 and PHP.

  1. Install the Linux Subsytem
  2. Installing Apache & PHP (sudo apt-get install apache2 libapache2-mod-php7.0 php7.0 php7.0-mysql mysql-server) a. PhpMyAdmin https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-16-04
  3. Install Eclipse an create a Folder on the C: Partion Root winwww which your eclipse Workspace is located.
  4. Create Symlink from Subsystem to NTFS Partition a. cd /var/www/html
@nadar
nadar / Dynamic Detach After Find Event.php
Last active August 13, 2017 11:35
Dynamic Detach After Find Event
<?php
// Model
class MyText extends \yii\db\ActiveRecord
{
public $unserialize = true;
public function behaviors()
{
$behaviors = []
@nadar
nadar / gist:0dbc0d84df486b83fb4b9b4ee3f2deeb
Created December 19, 2018 13:48
Amazone ELB Webserver https information
apache:
SetEnvIf x-forwarded-proto https HTTPS=on
@nadar
nadar / activedataprovider.php
Last active July 30, 2019 09:57
activedataprovider.php
<?php
class SearchModel extends \yii\base\Model
{
public $suchen;
public function rules()
{
return [['suchen'], 'string'];
}
@nadar
nadar / assumption.php
Created November 4, 2019 10:08
assumption.php
<?php
class MyAction extends BaseAction
{
public function route(): string
{
return '/call-this-server';
}
public function run(array $params): \Heartbeat\RPA\ActionResponse