<?php
function remove_key_prefix( $prefix, $array ) {
return array_combine(
// remove key prefix
array_map(function($v) use ($prefix) {
return str_replace( $prefix, '', $v );
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 python | |
import sys | |
from os import listdir | |
from os.path import isfile, join, dirname, realpath | |
try: | |
from PyPDF2 import PdfFileReader, PdfFileWriter | |
except ImportError: | |
from pyPdf import PdfFileReader, PdfFileWriter |
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
UNKNOWN | |
IRREGULAR_APP_INSTALL | |
TEXT_OVERLAY | |
ADULT_CONTENT | |
ADULT_HEALTH | |
ALCOHOL | |
ANIMATED_IMAGE | |
BEFORE_AND_AFTER | |
CASUAL_DATING | |
DATING |
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/bash | |
echo -n "Where are your websites stored? [/var/www]: " | |
read WEBSITES_ROOT_DIRECTORY | |
if [ -z "$WEBSITES_ROOT_DIRECTORY" ] | |
then | |
WEBSITES_ROOT_DIRECTORY="/var/www" | |
fi | |
echo -n "git user (user that SSH key was added to the GitHub) [root]: " |
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
zend_extension=xdebug.so | |
xdebug.remote_enable = 1 | |
xdebug.remote_connect_back = 1 | |
xdebug.remote_port = 9000 | |
xdebug.scream = 0 | |
xdebug.cli_color = 1 | |
xdebug.show_local_vars = 1 | |
xdebug.idekey = PHPSTORM | |
xdebug.mode=debug |
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/bash | |
META_DATA_URL="http://169.254.169.254/latest/meta-data" | |
TOKEN=`curl -s -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"` | |
function metadata() { | |
echo `curl -s -H "X-aws-ec2-metadata-token: $TOKEN" "$META_DATA_URL/$1"` | |
} | |
cat <<EOT >> index.html |
The set
lines
- These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
- With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
set -euxo pipefail
is short for:
set -e
set -u
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: whatsapp-metrics | |
name: whatsapp-metrics | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: |
Just chat.deepseek.com with prompts adapted from this gist.
- For the
qX_0
variants, they are actually quite straight-forward so deepseek can come up with a correct result in 1 shot. - For the
qX_K
it's more complicated, I would say most of the time I need to re-prompt it 4 to 8 more times. - The most difficult was
q6_K
, the code never works until I ask it to only optimize one specific part, while leaving the rest intact (so it does not mess up everything)