Skip to content

Instantly share code, notes, and snippets.

View jugatsu's full-sized avatar

Anton Kvashenkin jugatsu

View GitHub Profile
@igmar
igmar / extensions.lua
Created November 13, 2012 15:55
Asterisk LUA dialplan
require("lsqlite3")
-- Igmar: Wanneer closen we dat DB object eigenlijk ?
db = sqlite3.open('/etc/asterisk/users.sqlite')
--CONSOLE = "Console/dsp" -- Console interface for demo
--CONSOLE = "DAHDI/1"
--CONSOLE = "Phone/phone0"
TRUNK = "DAHDI/G1"
@analytically
analytically / interfaces
Last active July 31, 2023 11:52
Ansible interface bonding tasks.
# {{ ansible_managed }}
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
{% if ansible_interfaces|length > 2 %}
@tvjames
tvjames / Vagrantfile
Last active August 11, 2022 14:27
Prepare a Windows Server 2008 R2 instance for use with vagrant-windows.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@rxaviers
rxaviers / gist:7360908
Last active November 18, 2024 10:08
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@skarllot
skarllot / bacula-dir.conf
Last active March 28, 2024 23:35
Bacula configuration to use sendEmail
. . .
Messages {
Name = Standard
mailcommand = "/usr/local/bin/sendEmail-backup \"[BACKUP] %t %e of %n %l\" \"%r\""
operatorcommand = "/usr/local/bin/sendEmail-backup \"[BACKUP] Intervention needed for %j\" \"%r\""
mail = [email protected] = all, !skipped
operator = [email protected] = mount
console = all, !skipped, !saved
append = "/var/log/bacula/bacula.log" = all, !skipped
catalog = all
@tompave
tompave / nginx.conf
Last active August 6, 2024 13:21
commented nginx.conf for Ruby on Rails
# A commented nginx configuration file for Ruby on Rails
#
# Author: Tommaso Pavese
# [email protected]
# http://tommaso.pavese.me
#
# License: http://www.wtfpl.net/
#
#
# Tested with:
@vkhatri
vkhatri / ssh-config-port-forwarding.sh
Last active December 30, 2022 12:25
Configure SSH Port Forwarding via .ssh/config
# Remote Gateway Node to Login to App Servers - 192.168.1.1
Host app_proxy1
Hostname 192.168.1.1
LocalForward 8080 192.168.1.100:8080
LocalForward 8081 192.168.1.101:8080
LocalForward 8082 192.168.1.102:8080
Host app_proxy2
Hostname 192.168.1.1
LocalForward 8090 192.168.1.100:8081
@Dan1el42
Dan1el42 / DesiredStateConfiguration-SCCMDistributionPoint.ps1
Last active December 31, 2016 18:27
Prepare Windows Server 2012 machine via #PowerShell #DSC to host System Center Configuration Manager 2012 (SCCM) distribution point
Configuration SCCMDistributionPoint
{
# Create NO_SMS_ON_DRIVE.SMS file on C:\ drive
File NoSmsOnDrive
{
DestinationPath = "C:\NO_SMS_ON_DRIVE.SMS"
Contents = [System.String]::Empty
Type = "File"
Ensure = "Present"
}
@Kartones
Kartones / postgres-cheatsheet.md
Last active November 15, 2024 21:14
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@ringe
ringe / README.md
Last active May 22, 2022 14:10
KVM QCOW2 Live backup

Live backup of KVM virtual machines

This script will let you make backups of live VMs running on KVM, using libvirt.

The backup job will suspend the VM for the time it takes to copy the RAM to disk.

Credits: Luca Lazzeroni

I've made some minor adjustments.