Skip to content

Instantly share code, notes, and snippets.

Rich Text Editing

External Links

  • WYSIWYG HTML
    • TinyMCE
      • looks like bootstrap
      • license: LGPL
      • integrates with Plupload for file uploading (PHP only)
  • integrates with MoxieManager for file management (PHP only)
@dypsilon
dypsilon / callback_pattern.js
Last active April 28, 2024 08:53
The callback pattern found in many node.js functions.
var invokee1 = function(err, callback) {
// cant change this function
callback();
};
var invokee2 = function(err, optional1, optional2, callback) {
// work with optional 1 or optional 2
console.log(optional1);
console.log(optional2);
// cant change this function
@dypsilon
dypsilon / reader_future.js
Created August 9, 2016 19:21
Reader + Future Monads Usage
/**
* This short program will encrypt the user password
* and insert a new record into a mock database.
*/
const Reader = require('fantasy-readers');
const Future = require('fluture');
const R = require('ramda');
const crypto = require('crypto');
// our mock database
@dypsilon
dypsilon / examples.js
Last active April 28, 2024 08:52
Lazy Continuation Monad in JavaScript
const Cont = require('./lazy-continuation');
// pointed version
const c = Cont.of(5) // initial value
.chain((x) => {
return Cont.of(x + 5); // synchronous computation
})
.chain((x) => { // async computation
return new Cont((resolve) => {
setTimeout(() => resolve(x + 15), 500);
@nafiesl
nafiesl / how_to_get_telegram_chat_id.md
Created December 20, 2023 11:49
How to get Telegram Bot Chat ID

How to get Telegram Bot Chat ID

Create a Telegram Bot and get a Bot Token

  1. Open Telegram application then search for @BotFather
  2. Click Start
  3. Click Menu -> /newbot or type /newbot and hit Send
  4. Follow the instruction until we get message like so
    Done! Congratulations on your new bot. You will find it at t.me/new_bot.
    
@skfarhat
skfarhat / VSCode Internal Commands
Created May 19, 2020 21:22
List of VSCode commands
--------------------------------------------
Version: 1.45.1
Commit: 5763d909d5f12fe19f215cbfdd29a91c0fa9208a
Date: 2020-05-14T08:33:47.663Z
Electron: 7.2.4
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 18.5.0
-------------------------------------------