Skip to content

Instantly share code, notes, and snippets.

View chungminhtu's full-sized avatar

Chung Minh Tú chungminhtu

View GitHub Profile
@chungminhtu
chungminhtu / firebase.module.ts
Created January 9, 2019 08:11 — forked from NEO97online/firebase.module.ts
Angular Firebase Module boilerplate for AngularFire2 (using Firestore and Storage) NgModule
import { NgModule } from '@angular/core';
import { AngularFireModule } from 'angularfire2';
import { AngularFirestoreModule } from 'angularfire2/firestore';
import { AngularFireAuthModule } from 'angularfire2/auth';
import { AngularFireStorageModule } from 'angularfire2/storage';
import { environment } from '../../environments/environment';
import { FirestoreService } from './firestore.service';
import { StorageService } from './storage.service';
@chungminhtu
chungminhtu / ContentExtensions.cs
Created January 10, 2019 01:32 — forked from naepalm/ContentExtensions.cs
A set of useful extension methods for Umbraco properties.
namespace Client.Web
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Models;
using Newtonsoft.Json;
using Umbraco.Core.Models;
@chungminhtu
chungminhtu / APIControllerTests.cs
Created January 10, 2019 01:33 — forked from aDotNetDeveloper/APIControllerTests.cs
Umbraco Test Container for mocking
using FluentAssertions;
using Inferno.Services.MediaCMS.Controllers;
using NSubstitute;
using Umbraco.Core;
using Umbraco.Core.Models;
using Umbraco.Core.Models.EntityBase;
using Xunit;
namespace Inferno.Services.MediaCMS.Tests.Controllers
{
@chungminhtu
chungminhtu / ForgotPassword.cshtml
Last active January 10, 2019 02:17 — forked from DavidVeksler/ForgotPassword.cshtml
Umbraco 7: reset password for user and forgot password implementation #Umbraco
@using FEE.Domain
@inherits UmbracoTemplatePage
@{
Layout = "FEEMaster.cshtml";
var featuredImage = CoverImageProvider.GetCoverImageOrDefault(CurrentPage.featuredImage);
}
@section bodyClass {subpage}
@*TODO maybe implement:https://github.com/warrenbuckley/CWS-Umbraco-Standard-Membership/blob/master/CWSUmbracoStandardMembership/Views/AuthSurface/ResetPassword.cshtml
@chungminhtu
chungminhtu / youtube api video category id list
Created January 10, 2019 03:41 — forked from dgp/youtube api video category id list
youtube api video category id list
2 - Autos & Vehicles
1 - Film & Animation
10 - Music
15 - Pets & Animals
17 - Sports
18 - Short Movies
19 - Travel & Events
20 - Gaming
21 - Videoblogging
22 - People & Blogs
@chungminhtu
chungminhtu / getYoutubeVideoInfo.coffee
Created July 19, 2021 06:38 — forked from xissy/getYoutubeVideoInfo.coffee
Get a youtube video information from get_video_info.
request = require 'request'
youTubeMovieInfo =
youTubeMovieId: 'videoId'
url = "http://www.youtube.com/get_video_info?video_id=#{youTubeMovieInfo.youTubeMovieId}"
request.get url, (err, res, body) ->
return callback(false) if err
return callback(false) if res.statusCode isnt 200
@chungminhtu
chungminhtu / Listener - YouTube .gtm.tag.html
Created July 25, 2021 03:04 — forked from smhmic/Listener - YouTube .gtm.tag.html
Add YouTube JS API support for embedded YouTube videos
<script>(function(){
/*
This script is an alternative to the 'Add JavaScript API support to all YouTube videos'
setting in GTM's YT trigger. GTM's YT trigger will not load the YT API if no videos are
present at page load (it does add the enablejsapi param to dynanmically inserted videos,
but it will not load the YT API js). This script, on the other hand, should work in all cases.
*/
if( window.YT ) return;
@chungminhtu
chungminhtu / ios-chrome-devtools.md
Created December 17, 2022 00:28 — forked from james2doyle/ios-chrome-devtools.md
Enable remote debugging on the iOS simulator using Chrome Dev Tools

Install the tools:

brew install ios-webkit-debug-proxy

Run the simulator. And choose an iOS 10 device. The chrome remote debugging doesn't work with iOS 11 yet.

Enable the inspector

@chungminhtu
chungminhtu / _NGX_FFMPEG_WASM
Created February 4, 2024 14:31 — forked from Chris1234567899/_NGX_FFMPEG_WASM
Angular/Typescript adjustments of ffmpeg-core for ffmpeg.wasm with web workers
Typescript/angular port of @ffmpeg/ffmpeg library which is used with @ffmpeg/core (see https://github.com/ffmpegwasm/ffmpeg.wasm). Some smaller adjustments have also been made.
This snippet is designed to make use of web workers in angular (see https://angular.io/guide/web-worker) to encode media in a single threaded browser environment.
@chungminhtu
chungminhtu / README.md
Last active March 25, 2024 06:27 — forked from crypticmind/README.md
Setup lambda + API Gateway using localstack