This file contains hidden or 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
version: '3.2' | |
services: | |
webserver: | |
image: phpstorm/php-73-apache-xdebug-26 | |
ports: | |
- '80:80' | |
volumes: | |
- ./:/var/www/html | |
environment: | |
XDEBUG_CONFIG: remote_host=host.docker.internal |
This file contains hidden or 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 | |
$client = new \GuzzleHttp\Client(); | |
$response = $client->post('https://api.assemblyai.com/v2/transcript', [ | |
'headers' => [ | |
'authorization' => 'YOUR-API-TOKEN', | |
'content-type' => 'application/json' | |
], | |
\GuzzleHttp\RequestOptions::JSON => [ |
This file contains hidden or 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
[Unit] | |
Description=Example | |
Wants=example.timer | |
[Service] | |
ExecStart=/usr/bin/node /home/casey/Projects/example/index.js | |
WorkingDirectory=/home/casey/Projects/example | |
[Install] | |
WantedBy=multi-user.target |
This file contains hidden or 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
add_action('elementor/page_templates/header-footer/before_content', 'myprefix_google_tag_manager_no_js'); | |
function myprefix_google_tag_manager_no_js() { | |
<!-- Google Tag Manager (noscript) --> | |
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX" | |
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> | |
<!-- End Google Tag Manager (noscript) --> | |
} |
This file contains hidden or 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
" pretty-print json in buffer | |
nmap =j :%!python -m json.tool<CR> |
This file contains hidden or 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
function print_filters_for( $hook = '' ) { | |
global $wp_filter; | |
if( empty( $hook ) || !isset( $wp_filter[$hook] ) ) | |
return; | |
print '<pre>'; | |
print_r( $wp_filter[$hook] ); | |
print '</pre>'; | |
} |
This file contains hidden or 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
apt update | |
apt upgrade -y | |
apt install -y git gnupg2 | |
useradd -s /bin/bash -d /home/deploy -m -G sudo deploy | |
passwd deploy | |
# do the rest as deploy | |
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB |
This file contains hidden or 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
import lxml.etree,json | |
import requests | |
s = requests.Session() | |
s.headers.update({'User-Agent': 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36'}) | |
resp = s.get('https://www.lowes.com/pd/search/4005755/pricing/2421') | |
js = lxml.etree.HTML(resp.content).find('./head/script[2]').text |
This file contains hidden or 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 | |
cd $(mktemp -d) | |
wget -q https://software-lab.de/picoLisp.tgz | |
tar xzf picoLisp.tgz | |
cd picoLisp/src | |
make DYNAMIC-CC-FLAGS=-fPIC M32= |
This file contains hidden or 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
require 'tmpdir' | |
# | |
# Generates a template for you to work with using the ck4up utility from CRUX | |
# https://crux.nu/Wiki/WorkingWithCk4up | |
# | |
workspace = Dir.mktmpdir | |
Dir.chdir(workspace) |