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 | |
class Helper | |
{ | |
static public function buildPostData($post) | |
{ | |
// get css files | |
$css = ""; | |
foreach (BLOG_CSS_FILES as $file) { | |
$css .= "<link rel=\"stylesheet\" href=\"$file\" />\n"; |
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 { Configuration, OpenAIApi } from "openai"; | |
import NextCors from 'nextjs-cors'; | |
const configuration = new Configuration({ | |
apiKey: process.env.NEXT_PUBLIC_OPENAI_KEY, | |
}); | |
const openai = new OpenAIApi(configuration); | |
export default async function handler(req, res) { |
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 | |
// Required if your environment does not handle autoloading | |
require __DIR__ . '/vendor/autoload.php'; | |
// Use the REST API Client to make requests to the Twilio REST API | |
use Twilio\Rest\Client; | |
// Your Account SID and Auth Token from twilio.com/console | |
$sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; | |
$token = 'your_auth_token'; |
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
/* Node.JS */ | |
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; // Your Account SID from www.twilio.com/console | |
const authToken = 'your_auth_token'; // Your Auth Token from www.twilio.com/console | |
const twilio = require('twilio'); | |
const client = new twilio(accountSid, authToken); | |
client.messages | |
.create({ | |
messagingServiceSid: "YOUR_MESSAGING_SERVICE_ID", |
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
$.fn.touch = function (callback) { | |
$.touchMove = false; | |
$.touch = false; | |
$.touchAction = ""; | |
$(this).on("click", function (e) { | |
if (!$.touch) { | |
$.touchAction = 'click'; | |
let callbackReal = callback.bind(this); | |
callbackReal(this, e); | |
} else { |