Skip to content

Instantly share code, notes, and snippets.

View Crusader4Christ's full-sized avatar

Herman Klushin Crusader4Christ

View GitHub Profile
#add the repositories
sudo apt-get update && sudo apt-get install -y curl
curl https://files.freeswitch.org/repo/ubuntu/freeswitch-1.6/freeswitch_archive_g0.pub | apt-key add -
echo "deb http://files.freeswitch.org/repo/ubuntu/freeswitch-1.6/ trusty main" | sudo tee /etc/apt/sources.list.d/freeswitch.list
sudo apt-get update
# install dependencies
@Crusader4Christ
Crusader4Christ / run-for-all.sh
Created July 12, 2020 21:00
run bush cmd for each dir in the list
#!/bin/bash
file="./lambdas.txt"
lines=`cat $file`
targetDir=$PWD;
#for line in $(ls $targetDir/) # this cycle for all subdirs
for line in $lines; #this cycle for list from file
do
echo "Start processing for " $line
cd $targetDir/$line
@Crusader4Christ
Crusader4Christ / typeguard.ts
Last active April 22, 2024 09:27
Typeguard method with enheritance
export abstract class BaseClass {
/**
* Generic method to typeguard provided instance
* @param entity
*/
public static classOf<T extends typeof BaseClass>(
this: T,
entity: BaseClass,
): entity is InstanceType<T> {
return entity.constructor.name === this.name;