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
/*Display Youtube Link*/ | |
add_filter('the_content', 'add_my_content'); | |
function add_my_content($content) { | |
$my_custom_text = get_post_meta(get_the_ID(), 'youtube_link', $single = true); | |
$embed_code = wp_oembed_get($my_custom_text, array('width'=>720, 'height'=>420)); | |
if ($my_custom_text) { | |
$content .= $embed_code; | |
$content .= '<p></p>'; |
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 d = new Date(); | |
var mth = d.getMonth() + 1; | |
var str1; | |
if (mth == 11) { | |
str1 = '//localhost/wordpress/wp-content/uploads/2015/11/'; | |
} | |
else if (mth == 12) { | |
str1 = '//localhost/wordpress/wp-content/uploads/2015/12/'; | |
} |
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
<div id="root"> | |
<!-- This element's contents will be replaced with your component. --> | |
</div> |
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
export default { | |
/* | |
** Nuxt rendering mode | |
** See https://nuxtjs.org/api/configuration-mode | |
*/ | |
/* | |
** Nuxt target | |
** See https://nuxtjs.org/api/configuration-target | |
*/ |
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
<template> | |
<div> | |
<div>Login Page</div> | |
<div ref="ndi"></div> | |
</div> | |
</template> | |
<script> | |
export default { | |
data() { |
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> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | |
<script src="https://stg-id.singpass.gov.sg/static/ndi_embedded_auth.js"></script> | |
<script> | |
function getData(ajaxurl) { | |
return $.ajax({ | |
url: ajaxurl, | |
type: "GET" | |
}); |
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 { useCollection, useDocumentOnce } from 'react-firebase-hooks/firestore' | |
import firebase from '../../firebase' | |
import { useEffect, useState } from 'react' | |
import ReactPaginate from 'react-paginate' | |
const ShowTWVideoList = ({ uid }) => { | |
const [allPosts, loading, error] = useCollection( | |
firebase | |
.firestore() | |
.collection('twitchVideos') |
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
class AuthController < ApplicationController | |
before_action :prevent_page_cache | |
skip_before_action :verify_authenticity_token | |
def student | |
reset_session | |
end | |
def student_callback |
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
class ApplicationController < ActionController::Base | |
def prevent_page_cache | |
@turbolinks_no_cache = true | |
response.headers['Cache-Control'] = 'no-cache, no-store' | |
response.headers['Pragma'] = 'no-cache' | |
response.headers['Expires'] = 'Fri, 01 Jan 1990 00:00:00 GMT' | |
end |
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
source 'https://rubygems.org' | |
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
ruby '2.6.6' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '~> 6.1.4.4' | |
# Use postgresql as the database for Active Record | |
gem 'pg', '>= 0.18', '< 2.0' | |
# Use Puma as the app server |
OlderNewer