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 Tiptap from './tiptap'; | |
Alpine.data('tiptapEditor', Tiptap); | |
window.Alpine = Alpine | |
Alpine.start() | |
... |
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
// 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 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
#!/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 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 '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 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
// 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 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
/** | |
* 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 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
var validated = false; | |
$('body').on('submit', '.upload-cv-form', function(e) { | |
if(validated) { | |
return true; | |
} | |
// else do validation | |
e.preventDefault(); |
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
--- | |
third_party/structure/views/index.php | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
diff --git a/third_party/structure/views/index.php b/third_party/structure/views/index.php | |
index 2bf7e9d..2db600f 100755 | |
--- a/third_party/structure/views/index.php | |
+++ b/third_party/structure/views/index.php | |
@@ -47,7 +47,7 @@ $level_lock_delete = is_numeric(substr($permissions['delete'], -1)) ? (int)subst | |
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
<!DOCTYPE html> | |
<html lang="nb"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
</head> | |
<body> |
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
$grid_image = str_replace('{filedir_1}', '/uploads/', $grid_image); | |
/** | |
This is how the above _should_ be done: | |
if (preg_match('/^{filedir_(\d+)}/', $src, $matches)) | |
{ | |
$filedir_id = $matches[1]; | |
$this->EE->load->model('file_upload_preferences_model'); |
NewerOlder