Skip to content

Instantly share code, notes, and snippets.


Victorry veob

View GitHub Profile
veob / setwebhook.js
Created Jan 30, 2020 — forked from imdkbj/setwebhook.js
Setup to listen telegram multiple bots on webhooks.
View setwebhook.js
const axios = require('axios');
const apiurl = '';
const serveraddress = '';
const tokens = ['3445345345:454545-iY_wE6wj_aKDJwKLXk', '453454545:gffgfgzbcfjhsdbflhjdsfvhjlvdsf'];
//set webhook
//you can make this as call as way you want.
webhookURL(tokens, 50, 8443, 'tgram');
async function webhookURL(bot_tokens, max_connections, port, from) {
veob / EmojiText.jsx
Created Jan 2, 2018
Render native emoji as emoji-mart components (quick solution)
View EmojiText.jsx
const _ = require('lodash');
const React = require('react');
const propTypes = require('prop-types');
const {Emoji, emojiIndex} = require('emoji-mart');
const regexp = new RegExp(
'[\u{1f300}-\u{1f5ff}\u{1f900}-\u{1f9ff}\u{1f600}-\u{1f64f}' +
'\u{1f680}-\u{1f6ff}\u{2600}-\u{26ff}\u{2700}-\u{27bf}\u{1f1e6}' +
'-\u{1f1ff}\u{1f191}-\u{1f251}\u{1f004}\u{1f0cf}\u{1f170}-\u{1f171}' +
veob / cloudSettings
Last active Jun 4, 2018
Visual Studio Code Settings Sync Gist
View cloudSettings
veob / psql_naturalsort
Last active Dec 4, 2020
PostgreSQL natural sort
View psql_naturalsort
create or replace function naturalsort(text)
returns bytea language sql immutable strict as
$f$ select string_agg(convert_to(coalesce(r[2],length(length(r[1])::text) || length(r[1])::text || r[1]),'SQL_ASCII'),'\x00')
from regexp_matches($1, '0*([0-9]+)|([^0-9]+)', 'g') r; $f$;
veob / .bashrc
Last active Aug 29, 2015
TJ's bash aliases for git
View .bashrc
alias gd="git diff"
alias ga="git add"
alias gbd="git branch -D"
alias gst="git status"
alias gca="git commit -a -m"
alias gm="git merge --no-ff"
alias gpt="git push --tags"
alias gp="git push"
alias grh="git reset --hard"
alias gb="git branch"