Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| #!/bin/bash | |
| # https://serverok.in/bash-script-to-monitor-disk-usage | |
| CURRENT_USAGE=$(df / | grep -v 'Filesystem' | awk '{print $5}' | sed 's/%//g') | |
| ALERT_ON=80 | |
| if [ "$CURRENT_USAGE" -gt "$ALERT_ON" ] ; then | |
| mail -s 'Disk Usage Warning' you@yourdomain.com << EOF | |
| Disk almost full on / partition. Current Useage: $CURRENT_USAGE% | |
| EOF |
| <?php | |
| $url = "http://localhost:8000/PortalService"; | |
| //targetNamespace | |
| $uri = "http://localhost/partalService"; | |
| $key = "xxx"; | |
| $pwd = "xxx"; | |
| $options=array( | |
| //'soap_version'=>SOAP_1_2, |
| <?php | |
| if ($argc === 1) { | |
| echo "Usage: php calc.php EXPR\n"; | |
| exit(1); | |
| } | |
| $input = $argv[1]; | |
| $operators = [ |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title></title> | |
| </head> | |
| <body> | |
| <h1>Audio</h1> |
| # To extract the sound from a video and save it as MP3: | |
| ffmpeg -i <video.mp4> -vn <sound>.mp3 | |
| # To convert frames from a video or GIF into individual numbered images: | |
| ffmpeg -i <video.mpg|video.gif> <frame_%d.png> | |
| # To combine numbered images (frame_1.jpg, frame_2.jpg, etc) into a video or GIF: | |
| ffmpeg -i <frame_%d.jpg> -f image2 <video.mpg|video.gif> | |
| # To quickly extract a single frame from a video at time mm:ss and save it as a 128x128 resolution image: |
| <?php | |
| // Used in https://github.com/im4aLL/roolith-event | |
| class Event { | |
| private static $events = []; | |
| public static function listen($name, $callback) { | |
| self::$events[$name][] = $callback; | |
| } |
| <!doctype html> | |
| <html lang="en"> | |
| <body> | |
| <span id="output"></span> | |
| </body> | |
| <script> | |
| (function () { | |
| var workerBlob = new Blob( | |
| [workerRunner.toString().replace(/^function .+\{?|\}$/g, '')], | |
| { type:'text/javascript' } |
| <?php | |
| return [ | |
| "af" => "Afrikaans", | |
| "af-ZA" => "Afrikaans (South Africa)", | |
| "ar" => "Arabic", | |
| "ar-XA" => "Arabic", | |
| "ar-AE" => "Arabic (U.A.E.)", | |
| "ar-BH" => "Arabic (Bahrain)", |
| #!/usr/bin/env bash | |
| if [[ -x $(which php) ]]; then | |
| PHP_ICU_VERSION=$(php -r 'echo defined("INTL_ICU_VERSION") ? INTL_ICU_VERSION : "none";') | |
| echo "PHP ICU version: $PHP_ICU_VERSION" | |
| else | |
| echo 'WARNING: PHP not installed' | |
| PHP_ICU_VERSION=none | |
| fi |