- Daemonizing a container
$ docker run -d
- Leaving the container
CTRL
+P
-> q
import React from 'react'; | |
import { Button } from '@shopify/polaris'; | |
import { useAppBridge } from '@shopify/app-bridge-react'; | |
import { NavLink, useNavigate } from '@remix-run/react'; | |
const appHandle = "your-app-handle"; | |
/** | |
* `polaris.Link` can't open embedded app's links and `shopify://` links a in a new tab. | |
* This component embables that while keeping it working as usual when no modifier key is pressed when clicking. |
#!/bin/bash | |
check_repo_status() { | |
local dir="$1" | |
# Check if it's a git repository | |
if ! git -C "$dir" rev-parse --is-inside-work-tree > /dev/null 2>&1; then | |
return | |
fi | |
<?php | |
include __DIR__ . '/vendor/autoload.php'; | |
$redis = new Redis(); | |
$redis->connect('127.0.0.1', 6379); | |
$pool = new \Cache\Adapter\Redis\RedisCachePool($redis); |
awk -F\" '{arr[$6]++}END{for(a in arr) print arr[a], a}' access.log | sort -n |
description "mailhog" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
exec start-stop-daemon --start --make-pidfile --pidfile /var/run/mailhog.pid --exec /usr/local/bin/mailhog >> /var/log/mailhog.log 2>&1 |
<?php | |
$codes = array(); | |
function generateCode(){ | |
global $codes; | |
$chars = "azertyupqsdfghjklmwxcvbn23456789"; | |
$charsCount = strlen($chars) - 1; |
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
<?php | |
class EmailTestCase extends PHPUnit_Framework_TestCase { | |
/** | |
* @var \Guzzle\Http\Client | |
*/ | |
private $mailcatcher; | |
public function setUp() | |
{ |
encodeTo="UTF-8" | |
# CHANGE THE PATTERN IF NEEDED | |
for filename in ` find . -type f -name "*.php"` | |
do | |
echo $filename | |
enc=`file -bi $filename | awk -F"charset=" '{print $2}'` | |
iconv -f $enc -t $encodeTo $filename -o $filename | |
done |