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
var validated = false; | |
$('body').on('submit', '.upload-cv-form', function(e) { | |
if(validated) { | |
return true; | |
} | |
// else do validation | |
e.preventDefault(); |
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
/** | |
* Force HTTPS on prod & staging. This functionality was previously in the .htaccess'es but we moved | |
* it here to ease multiple environment development. | |
*/ | |
if(FORCE_HTTPS && (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "")){ | |
$redirect_url = filter_var("https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'], FILTER_VALIDATE_URL); | |
if($redirect_url) { | |
header("HTTP/1.1 301 Moved Permanently"); | |
header("Location: $redirect_url"); | |
die(); |
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
// Note, I used Timber so my functions.php includes a class that extends TimberSite, but the gist here will be the same; | |
// add an action that outputs css in the admin to hide some Yoast SEO features. | |
// in functions.php, add this action: | |
add_action('admin_head', array($this, 'wpseo_css')); | |
// Then you need this wpseo_css function in the same class: | |
/** |
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 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { |
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 bash | |
flavorName=$1; | |
[ "$flavorName" == "" ] && { echo "Usage: $0 <client name>"; exit 1; } | |
if [ -d "clients/$flavorName" ]; then | |
echo "Client $flavorName found .." | |
plutil -replace CFBundleIdentifier -string no.lastfriday.heyho.rebusloep.$flavorName ios/Runner/Info.plist |
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
// In TwigBridge.php (or a better location if you don't want to be too hacky) | |
use Innocenzi\Vite\Vite; | |
use Twig\TwigFunction; | |
lass ViteExtension extends Twig\Extension\AbstractExtension { | |
public function getFunctions() | |
{ | |
return [ |
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 Tiptap from './tiptap'; | |
Alpine.data('tiptapEditor', Tiptap); | |
window.Alpine = Alpine | |
Alpine.start() | |
... |
OlderNewer