Skip to content

Instantly share code, notes, and snippets.

View antirek's full-sized avatar

Dmitriev Sergey antirek

  • Mobilon Telecom / mobilon.ru
  • Krasnoyarsk
  • 00:16 (UTC +07:00)
View GitHub Profile
@Haythamasalama
Haythamasalama / createTopicsTelegram.js
Created August 18, 2023 17:44
Automated Telegram Topic Generation using JavaScript
const subjects = [
{
name: "Quizzes",
icon_custom_emoji_id: "5433614043006903194",
text: "Quizzes Topic",
},
// etc
];
const telegramToken = "";
const chatId = "";
@skushnerchuk
skushnerchuk / Dialog.vue
Last active September 28, 2021 14:28
Quasar dialog
<template>
<q-dialog ref="dialog" @hide="onDialogHide">
<q-card style="min-width: 450px">
<q-card-section>
<span v-if="title">
{{ title }}
<q-space style="height: 10px"/>
</span>
@jaytaylor
jaytaylor / delete-from-v2-docker-registry.md
Last active June 10, 2024 13:57
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
@gumo78
gumo78 / kamailio.cfg
Created August 24, 2017 11:13 — forked from soufianeEL/kamailio.cfg
Kamailio.cfg with SIP over websockets support included and PostgreSQL as database engine ( Kamailio v=4.1.3 )
#!KAMAILIO
#
# Kamailio (OpenSER) SIP Server v4.1 - default configuration script
# - web: http://www.kamailio.org
# - git: http://sip-router.org
#
# Direct your questions about this file to: <sr-users@lists.sip-router.org>
#
# Refer to the Core CookBook at http://www.kamailio.org/wiki/
# use this command to add 5-seconds delay to the audio track of a video
#
ffmpeg -i input.mp4 -itsoffset 5 -i input.mp4 -map 0:v -map 1:a -vcodec copy -acodec copy delayed.mp4
@zmts
zmts / tokens.md
Last active July 17, 2024 07:29
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@corny
corny / lua-udp.lua
Created July 4, 2016 16:08
Lua UDP example
#!/usr/bin/env lua5.2
--
-- apt install lua5.2 lua-socket
--
local socket = require("socket")
local udp = assert(socket.udp())
local data
udp:settimeout(1)
@debashisbarman
debashisbarman / README.md
Last active February 15, 2024 02:19
A boilerplate Twitter bot that can retweet in response to the tweets matching particluar keyword (https://goo.gl/4whEIt)

Creating a Twitter bot with Node.js

Learn how you can create your own Twitter bot using Node.js and the new Twitter API. The bot will auto retweet in response to tweets with some particular hashtags. (https://goo.gl/4whEIt)

Tools we need

Here are the tools we’ll be using to create the bot — 

  • Node.js installed in your machine
  • A registered Twitter account

Create a Twitter application

@DarrenN
DarrenN / get-npm-package-version
Last active July 15, 2024 13:04 — forked from yvele/get-npm-package-version.sh
Extract version from package.json (NPM) using bash / shell
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
echo $PACKAGE_VERSION
@maxkfranz
maxkfranz / code.js
Last active February 25, 2020 06:42
Images
$(function(){ // on dom ready
// photos from flickr with creative commons license
var cy = cytoscape({
container: document.getElementById('cy'),
boxSelectionEnabled: false,
autounselectify: true,