git clone <repo>
clone the repository specified by ; this is similar to "checkout" in some other version control systems such as Subversion and CVS
Add colors to your ~/.gitconfig file:
#!/bin/bash | |
# Author: Thomas Berezansky <[email protected]> | |
# Author: Jason Stephenson <[email protected]> | |
# | |
# Feel free to use and to share this script in anyway you like. | |
# This script is intended as a shortcut for the git cherry-pick | |
# command when you have several commits that you want to cherry-pick | |
# into your local branch from another branch. It often results in a |
class Graph: | |
def __init__(self): | |
self.nodes = set() | |
self.edges = defaultdict(list) | |
self.distances = {} | |
def add_node(self, value): | |
self.nodes.add(value) | |
def add_edge(self, from_node, to_node, distance): |
#! /usr/bin/env python | |
# A small script for cdp devices discovery | |
import sys | |
import pcapy | |
import socket | |
from dpkt import ethernet | |
from dpkt import cdp | |
from docopt import docopt |
#!/usr/bin/env zsh | |
git show-branch -a \ | |
| grep '\*' \ | |
| grep -v `git rev-parse --abbrev-ref HEAD` \ | |
| head -n1 \ | |
| sed 's/.*\[\(.*\)\].*/\1/' \ | |
| sed 's/[\^~].*//' | |
# How it works: |
import requests | |
url="http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" | |
#headers = {'content-type': 'application/soap+xml'} | |
headers = {'content-type': 'text/xml'} | |
body = """<?xml version="1.0" encoding="UTF-8"?> | |
<SOAP-ENV:Envelope xmlns:ns0="http://ws.cdyne.com/WeatherWS/" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> | |
<SOAP-ENV:Header/> | |
<ns1:Body><ns0:GetWeatherInformation/></ns1:Body> | |
</SOAP-ENV:Envelope>""" |