Skip to content

Instantly share code, notes, and snippets.

View minhhungit's full-sized avatar
😘
Hello world

Jin minhhungit

😘
Hello world
View GitHub Profile
// ~/Modules/Common/Helpers/MySlilerReveal.ts
namespace [PUT_YOUR_NAMESPACE_HERE].Common {
export class MySlilerRevealOptions {
grid: Serenity.DataGrid<any, any>;
dlg: Serenity.EntityDialog<any, any>;
onDataChangeCallback?: () => void;
sliderWidth?: any;
entityOrId?: any;
constructor() {
super();
let sdsAddFileBtn = this.form.Sds.element.find(".add-file-button");
let sdsClickEvt = (e) => {
e.preventDefault();
if (Q.trimToNull(Serenity.EditorUtils.getValue(this.form.Sds)) !== null) {
Q.confirm("This will overwrite the current file. Are you sure you want to continue?", () => {
@minhhungit
minhhungit / mongodb_c#_cheatsheet.md
Created July 18, 2019 12:34 — forked from a3dho3yn/mongodb_c#_cheatsheet.md
MongoDB C# Driver Cheat Sheet

MongoDB C# Driver Cheat Sheet

(C) 2015 by Derek Hunziker, (C) 2017 by AppsOn

As of releasing MongoDB 3.4 and C# Driver v2.4, original cheatsheet by Derek is outdated. In addition, it has some deficiencies like connecting to MongoDB, creating indexes, etc. This updated version works fine with C# Driver v2.4.7 and MongoDB v3.4.

Setup

Define Document Models

Note: Defined models and collections will be used in entire cheatsheet.

@minhhungit
minhhungit / wakeupapp-homeassistant.cs
Created February 25, 2019 11:33 — forked from rille111/wakeupapp-homeassistant.cs
Example for a C# .NET Home-Assistant consuming app
using System.Threading.Tasks;
using NLog;
using Rille.Hass.ApiProxy;
using Rille.Hass.AppStarter;
using Rille.Hass.Models.StateChangeEventGraph;
namespace HassLab.Console.HassApps
{
public class WakeUpApp : IHassApp
{