Skip to content

Instantly share code, notes, and snippets.

View adalenv's full-sized avatar
🌐
Worldwide

Adalen Vladi adalenv

🌐
Worldwide
View GitHub Profile
@adalenv
adalenv / vici_install.md
Created June 9, 2017 08:41 — forked from identor/vici_install.md
Guide: Vici Dial Installation

Vici Dial Installation Guide

This guide shows a simple Vici Dial installtion on a debian6_x64 droplet in Digital Ocean.

Create the Droplet

General Guidelines:

  • Create the Droplet by selecting Create Droplet in the Droplet's UI.
  • Select the 64 bit image of debian 6.

Dependency installation

We need to install all dependencies before proceeding to install the astguiclient.

<?php
# vdc_db_query.php
#
# Copyright (C) 2016 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed to exchange information between vicidial.php and the database server for various actions
#
# required variables:
# - $server_ip
# - $session_name
console.log('test');
@adalenv
adalenv / encode_decode.php
Created October 26, 2017 21:59 — forked from LogIN-/encode_decode.php
PHP custom encode decode functions
<?php
function encode($string,$key) {
$key = sha1($key);
$strLen = strlen($string);
$keyLen = strlen($key);
for ($i = 0; $i < $strLen; $i++) {
$ordStr = ord(substr($string,$i,1));
if ($j == $keyLen) { $j = 0; }
$ordKey = ord(substr($key,$j,1));
$j++;
@adalenv
adalenv / freepbx-asterisk13-install-opus.sh
Last active September 9, 2019 22:01 — forked from worldadventurer/freepbx-asterisk13-install-opus.sh
FreePBX Asterisk 13 Install Opus Codec
# This is for x64 only
# To check x32 vs x64, run: getconf LONG_BIT
# Tested on Centos x64 - on a FreePBX Distro 13 x64
echo -------
echo This installs opus codec from the Digium website
echo -------
read -rsp $'Press any key to continue OR CTRL-c to QUIT ...\n' -n1 key
cd ~
wget http://downloads.digium.com/pub/telephony/codec_opus/asterisk-13.0/x86-64/codec_opus-13.0_1.1.0-x86_64.tar.gz
@adalenv
adalenv / init.coffee
Last active August 27, 2019 15:17
GITHUB_TOKEN
init
service rocketchat stop
sudo rm -rf /opt/Rocket.Chat
curl -L https://releases.rocket.chat/latest/download -o /tmp/rocket.chat.tgz
tar -xzf /tmp/rocket.chat.tgz -C /tmp
cd /tmp/bundle/programs/server && npm install
sudo mv /tmp/bundle /opt/Rocket.Chat
sudo chown -R rocketchat:rocketchat /opt/Rocket.Chat
service rocketchat start
=IF(LEN(C1)>10,RIGHT(C1, LEN(C1)-2),C1) //remove first two chars if lengh> 10
=RIGHT(A1, LEN(A1)-2) //remove first two characters
=CONCATENATE(A1," ",B1) //merge cells
=LEN() //get length

Keybase proof

I hereby claim:

  • I am adalenv on github.
  • I am adalenv (https://keybase.io/adalenv) on keybase.
  • I have a public key whose fingerprint is C0E2 18F0 E3AE DD2B A6DB 2C9B B549 4F5C A538 5013

To claim this, I am signing this object:

@adalenv
adalenv / openVZ Commands
Last active December 20, 2018 16:35 — forked from rushipkar90/gist:e3a724885664420215c2
OpenVZ Commands
For OpenVZ refer this URL: (https://openvz.org/User_Guide/Operations_on_Containers)
=======================
vzlist -a ------ To list all the containers on OpenVZ including running and stopped.
vzlist -a 101 ----- To check specific container is present or not (101 => Container ID)
/vz/template/cache ------ Contains all the OS templates
/vz/private/ ----- it contains list of all the existing containers.