Skip to content

Instantly share code, notes, and snippets.

@ctaloi
ctaloi / pushover.sh
Created November 14, 2012 03:38 — forked from milligramme/pushover.sh
pushover commandline sample
curl -s \
-F "token=abc123" \
-F "user=user123" \
-F "message=hello world" \
https://api.pushover.net/1/messages
@ctaloi
ctaloi / generate_personal_podcast.rb
Created July 30, 2012 19:35 — forked from kelan/generate_personal_podcast.rb
A script for generating a personal podcast feed from mp3 files in a public Dropbox folder.
#!/usr/bin/env ruby -wKU
#
# by Kelan Champagne
# http://yeahrightkeller.com
#
# A script to generate a personal podcast feed, hosted on Dropbox
#
# Inspired by http://hints.macworld.com/article.php?story=20100421153627718
#
# Simply put this, and some .mp3 or .m4a files in a sub-dir under your Dropbox
SIP Gateway Compliance to RFC 3261 RFC 3262 and RFC 3264 Example
This section provides a configuration example to match the identified configuration tasks in the previous sections.
1w1d: %SYS-5-CONFIG_I: Configured from console by console
Building configuration...
Current configuration : 3326 bytes
!
!Last configuration change at 18:09:20 EDT Fri Apr 23 2004
!
version 12.3
@ctaloi
ctaloi / 5
Created December 20, 2016 21:09
no interface Async5/00
no interface Async5/01
no interface Async5/02
no interface Async5/03
no interface Async5/04
no interface Async5/05
no interface Async5/06
no interface Async5/07
no interface Async5/08
no interface Async5/09
@ctaloi
ctaloi / loop.sh
Created December 20, 2016 21:08
bash for loop
#!/bin/bash
for i in {0..9}
do
echo "no interface Async2/0$i"
echo "no interface Async3/0$i"
echo "no interface Async4/0$i"
done
for i in {10..107}
@ctaloi
ctaloi / conf
Created December 20, 2016 21:07
no interface Async3/00
no interface Async4/00
no interface Async3/01
no interface Async4/01
no interface Async3/02
no interface Async4/02
no interface Async3/03
no interface Async4/03
no interface Async3/04
no interface Async4/04
@ctaloi
ctaloi / conf
Created December 20, 2016 21:06
no interface Async2/00
no interface Async2/01
no interface Async2/02
no interface Async2/03
no interface Async2/04
no interface Async2/05
no interface Async2/06
no interface Async2/07
no interface Async2/08
no interface Async2/09
no interface Async2/1
no interface Async2/2
no interface Async2/3
no interface Async2/4
no interface Async2/5
no interface Async2/6
no interface Async2/7
no interface Async2/8
no interface Async2/9
no interface Async2/10
@ctaloi
ctaloi / gist:5861727
Last active November 14, 2016 18:05
Asterisk - Pass SIP Diversion if exists on the way in
exten => s,1,Set(TG_FULLNAME=${ARG2})
exten => s,n,Set(TRUNK=${CUT(TG_FULLNAME,/,2)})
exten => s,n,Set(ORIG_ANI=${CALLERID(rdnis)})
exten => s,n,Set(SIP_DOMAIN=${SIPDOMAIN})
exten => s,n,Set(ROUTE_STRIP=${ARG1})
exten => s,n,Set(DIALED=${DIALED_NUMBER:${ROUTE_STRIP}}
exten => s,n,GotoIf($[${LEN(${ORIG_ANI})} > 0]?100:101)
exten => s,100,SIPAddHeader(Diversion: <sip:${CALLERID(rdnis)}@${SIP_DOMAIN}>\;Reason=unconditional)
exten => s,101,Dial(SIP/${DIALED}@${TRUNK},,tT)
@ctaloi
ctaloi / gist:4156185
Created November 27, 2012 18:48 — forked from fcrespo82/gist:4137305
Script to sync Pythonista App to Dropbox
import webbrowser, os, pprint
# Include the Dropbox SDK libraries
#from dropbox import client, rest, session
import dropbox
# Configuration
TOKEN_FILENAME = 'PythonistaDropbox.token'
# Get your app key and secret from the Dropbox developer website
APP_KEY = '<your dropbox app_key>'
APP_SECRET = '<your dropbox app_secret>'