Skip to content

Instantly share code, notes, and snippets.

https://www.hackerrank.com/paper/mkccdufaxdlthryrutxjqvidxuzlbgkw?b=eyJpbnRlcnZpZXdfaWQiOjEwNDI3NzksInJvbGUiOiJpbnRlcnZpZXdlciIsInNob3J0X3VybCI6Imh0dHA6Ly9oci5ncy8xNjI0OTYiLCJjYW5kaWRhdGVfdXJsIjoiaHR0cDovL2hyLmdzLzJlMGUzOCJ9
@mrahul17
mrahul17 / voice.xml
Created October 29, 2018 07:05 — forked from vinayb21/voice.xml
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say voice="alice">Record your message in three, two, one, start.</Say>
<Record action="http://90e3ae2d.ngrok.io/paper/record_call" recordingStatusCallback="http://90e3ae2d.ngrok.io/paper/set_record_url" timeout="10" maxLength="15" playBeep="true" />
<Hangup/>
</Response>
@mrahul17
mrahul17 / try.xml
Created June 25, 2018 13:38
twilioml_try
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say>Hello, world!</Say>
</Response>
@mrahul17
mrahul17 / pT.py
Last active March 26, 2017 12:34
# Normalize strings having various forms of whitespace
" ".join(s.split())
# Ternary Operator
(1 and [a] or [b])[0]
@mrahul17
mrahul17 / dateparser.js
Created June 11, 2016 11:42
parsing date
date_options = {
"today" : 0,
"yesterday" : 24*60*60*1000 ,
"day" : 24*60*60*1000,
"week" : 7*24*60*60*1000,
"weeks" :7*24*60*60*1000
}
if (expenseObject.date) {
var dateRe = /(\d{4})-(\d{2})-(\d{2})/;
@mrahul17
mrahul17 / gist:a88bc9f20ad0e6eb55d417713748ad15
Created June 6, 2016 06:30
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
bayes.rb gist posix-spawn-benchmark sass youtube-dl
erubis jekyll rackup sass-convert
f2py kramdown redcarpet scss
ffscreencast listen rougify summarize.rb
fluxgui nokogiri safe_yaml xflux
@mrahul17
mrahul17 / redshift.conf
Last active April 1, 2016 04:49 — forked from bcomnes/redshift.conf
My configuration file for Redshift. Place it in ~/.config/ Drag redshift onto the Startup Applications menu to have it boot on start
; Global settings
[redshift]
temp-day=6500K
temp-night=5000
transition=1
;gamma=0.8:0.7:0.8
gamma=1.000:1.000:1.000
;location-provider=geoclue (no more internet connection required!!)
location-provider=manual
adjustment-method=vidmode
@mrahul17
mrahul17 / configs.txt
Last active April 30, 2016 01:59
List of config files that I am modifying
~/.bash_funcs
~/.bashrc
~/.bash_completion
/etc/rc.local
/etc/bluetooth/main.conf
/etc/sudoers