Skip to content

Instantly share code, notes, and snippets.

View Crusader4Christ's full-sized avatar

Herman Klushin Crusader4Christ

View GitHub Profile
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 ===;
Crusader4Christ /
Created July 12, 2020 21:00
run bush cmd for each dir in the list
lines=`cat $file`
#for line in $(ls $targetDir/) # this cycle for all subdirs
for line in $lines; #this cycle for list from file
echo "Start processing for " $line
cd $targetDir/$line
#add the repositories
sudo apt-get update && sudo apt-get install -y curl
curl | apt-key add -
echo "deb trusty main" | sudo tee /etc/apt/sources.list.d/freeswitch.list
sudo apt-get update
# install dependencies