Skip to content

Instantly share code, notes, and snippets.

View pranavgarg's full-sized avatar

Pranav Garg pranavgarg

View GitHub Profile
@pranavgarg
pranavgarg / coffeescript-to-javascript
Last active August 29, 2015 14:23
Coffeescript to Javascript
1. Conditionals & Operators
coffeescript Javascript
------------ -------------
== is ===
!= isnt !==
not !
and &&
or ||
true yes on true
false no off false
@pranavgarg
pranavgarg / renameVideoFile
Last active August 29, 2015 14:21
Renaming of files in python
"""
Before filename: recoded_videos%2Falgs4partI-64.mp4
new_file: 64.mp4
"""
import os
directory = '<DIR NAME>'
pattern_to_be_excluded = '.mp4'
pattern_to_be_excluded_2 = '-'
k = os.walk(directory)
@pranavgarg
pranavgarg / migrating from wind to cas server running wind protocol
Created April 10, 2015 15:38
Migrating from Wind to CAS Server running Wind Protocol
Changing from Wind Authentication to CAS Server running wind protocol is just as easy as changing domain names for login and validation.
Wind Authentication:
---------------------------------------------------------
LoginURL: https://wind.columbia.edu/login?service=[Optional]&destination=[destination-URI]
ValidationURL: https://wind.columbia.edu/validate?ticketid=[service-ticket]
[service] parameter is not really required on CAS. Even if you pass it would not matter.
Switching to CAS Server running Wind protocol: