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
interface Event<P> { | |
type: string; | |
payload: P; | |
} | |
type UserCreatedEvent = Event<{ | |
id: string; | |
fullName: string; | |
email: string; | |
role: string; |
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
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"definitions": { | |
"payload": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string", | |
"description": "The unique identifier for a user." |
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 app.js videourl audiourl | |
Exmaple: | |
node app.js https://kinescopecdn.net/192306f6-275d-4aa7-885e-d9cf8b0f72f5/videos/30764e9a-b6ea-48a5-82e6-113dda5e4bf1/assets/5a90932b-d2b6-4529-a713-c39c2238838b/1080p.mp4\?expires\=1640597177\&sign\=79391590fe0523a56bb042ef33c6fc9d https://kinescopecdn.net/192306f6-275d-4aa7-885e-d9cf8b0f72f5/videos/30764e9a-b6ea-48a5-82e6-113dda5e4bf1/assets/5c79ef12-c76d-4077-a82e-085f2a31130a/audio_0.mp4\?expires\=1640597177\&sign\=5ed29fc7d33f5c53aa8fc033c818fa74 | |
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
const validators = new class { | |
foo(): this { | |
return this; | |
} | |
bar(): this { | |
return this; | |
} | |
hello(): this { |
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
const { WebClient } = require('@slack/client'); | |
const client = new WebClient('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); | |
client.chat.postMessage('#general', 'Text 1', { | |
username: 'Test 1', | |
icon_url: 'https://slack-files2.s3-us-west-2.amazonaws.com/avatars/2017-07-31/219779967281_6024f981fe6f5a28b840_36.png' | |
}); | |
client.chat.postMessage('#general', 'Text 2', { |
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
function scrollPageTo(position, delta) { | |
delta *= Math.sign(position - document.body.scrollTop); | |
window.requestAnimationFrame(function animation() { | |
document.body.scrollTop += delta; | |
if (delta < 0 && position >= +document.body.scrollTop) { | |
return; | |
} | |
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 { MODAL_DIRECTIVES } from "ng2-modal"; | |
const Modal = MODAL_DIRECTIVES[0]; | |
Modal.prototype.close = function () { | |
var args = []; | |
for (var _i = 0; _i < arguments.length; _i++) { | |
args[_i - 0] = arguments[_i]; | |
} | |
if (!this.isOpened) |
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 FileHelper extends \yii\helpers\FileHelper | |
{ | |
public static function removeInTheEnd($filename) | |
{ | |
register_shutdown_function(function() use ($filename) { | |
if (file_exists($filename)) { | |
if (is_dir($filename)) { | |
static::removeDirectory($filename); |
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
#!/usr/bin/env bash | |
wmctrl -c "Viber " |
NewerOlder