I hereby claim:
- I am pranavgarg on github.
- I am pgarg (https://keybase.io/pgarg) on keybase.
- I have a public key whose fingerprint is 70F8 1545 7515 F45C 3441 2FA6 BEFA 817E EB70 BEBE
To claim this, I am signing this object:
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: |
""" | |
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) |
1. Conditionals & Operators | |
coffeescript Javascript | |
------------ ------------- | |
== is === | |
!= isnt !== | |
not ! | |
and && | |
or || | |
true yes on true | |
false no off false |
### | |
Install: meteor add audit-argument-checks | |
Description: This package will do type checking for the arguments. | |
E.g. Publish function sending data back based on the username | |
### | |
Meteor.publish({ | |
"posts": (currentUserName) -> | |
check currentUserName, String #this line does the typechecking. If missed following error thrown Exception from sub posts id .. Did not check() all arguments during publisher | |
Posts.find({author: currentUserName}).fields({}) | |
}) |
# lists the volumes | |
$> lsblk | |
# this lists all the volumes | |
xvda1 202:1 0 8G 0 disk / | |
xvdb 202:16 0 400G 0 disk /mnt | |
$> free -s /dev/xvdb | |
#would return data is its not yet formatted and doesn't have any data | |
#otherwise would return the block and storage type ext4 |
##INTRO | |
Docker is based on lxc (Linux Containers) which helps provide virtualization on the host OS. | |
Its lightweight and ease of use allows it to succeed over VMware virtualization. | |
##Useful commands | |
1. **docker ps** - Lists containers. | |
2. **docker logs** - Shows us the standard output of a container. | |
3. **docker stop** - Stops running containers. | |
4. **docker images** - Lists all the docker images |
class Node: | |
def __init__(self, value): | |
self._value = value | |
self._next = None | |
def __repr__(self): | |
return ("Node({!r})".format(self._value)) | |
def reverseList(head): | |
''' | |
reverses a linklist. |
a = ['1','2','3','4','5','6','7','8','9'] | |
def josepheus(int_list, skip): | |
skip = skip - 1 #list starts with 0 index | |
idx = 0 | |
output = [] | |
while len(int_list)>0: | |
idx = (skip+idx)%len(int_list) | |
k = int_list.pop(idx) | |
output.append(k) |
def flatten(l): | |
for el in l: | |
if isinstance(el, collections.Iterable) and not isinstance(el, basestring): | |
for sub in flatten(el): | |
yield sub | |
else: | |
yield el | |
assert [i for i in flatten([1,2,[3,4]])] == [1,2,3,4] |
I hereby claim:
To claim this, I am signing this object: