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
<?php | |
/* | |
* Plugin Name: Force light mode | |
* Plugin URI: https://stevenroh.ch | |
* Description: Force light mode for blockify theme | |
* Version: 0.1 | |
* Author: Steven Roh | |
* Author URI: https://stevenroh.ch | |
*/ |
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
import { screenshotOnFailure } from './helper'; | |
test.afterEach(screenshotOnFailure); |
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
import React, { useContext, useState, useEffect, createContext } from 'react'; | |
import { supabase } from '../supabase'; | |
// create a context for authentication | |
const AuthContext = createContext(); | |
export const AuthProvider = ({ children }) => { | |
// create state values for user data and loading | |
const [user, setUser] = useState(); | |
const [loading, setLoading] = useState(true); |
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
# Combines several solutions found on the internet | |
class ImplicitFTP_TLS(ftplib.FTP_TLS): | |
"""FTP_TLS subclass to support implicit FTPS.""" | |
"""Constructor takes a boolean parameter ignore_PASV_host whether o ignore the hostname""" | |
"""in the PASV response, and use the hostname from the session instead""" | |
def __init__(self, *args, **kwargs): | |
self.ignore_PASV_host = kwargs.get('ignore_PASV_host') == True | |
super().__init__(*args, {k: v for k, v in kwargs.items() if not k == 'ignore_PASV_host'}) | |
self._sock = None |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Letter print sheet</title> | |
<style> | |
* { | |
padding: 0; |

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
https://www.google.com/s2/favicons?sz=64&domain_url=yourdomain.here |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/trusty64" | |
# config.vm.synced_folder "P:\_IMAGES_ISO", "/vagrant_iso" # Use this line to mount a local folder on the Vagrant box | |
config.vm.provision "shell", inline: <<-SHELL | |
wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh | |
chmod +x pishrink.sh | |
sudo mv pishrink.sh /usr/local/bin |
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
<?php | |
/* $message — Default message to send to Slack | |
$form — Form object | |
$result — Array of result | |
*/ | |
function custom_cf_7( $message, $form, $result ) { | |
return "OK" . json_encode($form) . json_encode($result); // Customize message here | |
} | |
add_filter( 'slack_wpcf7_submit_message', 'custom_cf_7', 10, 3 ); |
NewerOlder