This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <style> | |
| table, td { | |
| border: 1px solid black; | |
| width:1000px; | |
| text-align: center; | |
| } | |
| </style> | |
| <body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <h2 text-align="center">My team's landing page</h2> | |
| <h3>Select some links from below</h3> | |
| <h4>This is a header</h4> | |
| <a href="https://imgur.com/r/cats">Show me some cats</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| from Tkinter import * ## Python 2.x | |
| #from tkinter import * ## Python 3.x | |
| class window: | |
| def __init__(self,master): | |
| self.master = master | |
| self.master.title("Elaborate gui to send an email v0.5") | |
| self.master.option_add("*Font", "DEC\ Terminal") | |
| self.day_frame = Frame(self.master, width = 800, bd = 1, relief = SUNKEN) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var printer = document.getElementById("demo") | |
| var HttpClient = function() { | |
| this.get = function(aUrl, aCallback) { | |
| var anHttpRequest = new XMLHttpRequest(); | |
| anHttpRequest.onreadystatechange = function() { | |
| if (anHttpRequest.readyState == 4 && anHttpRequest.status == 200) | |
| aCallback(anHttpRequest.responseText); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import argparse | |
| import sys | |
| import os | |
| def msg(): | |
| use = "my.py -h prints this help menu\n" | |
| use += "my.py -p <PROJECT> -i <INPUT_CFG_FILE>" | |
| return use | |
| def parse_args(): | |
| parser = argparse.ArgumentParser(description='This script does something', usage=msg()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sqlite3 my_tiny.db | |
| SQLite version 3.6.13 | |
| Enter ".help" for instructions | |
| Enter SQL statements terminated with a ";" | |
| # create a table | |
| sqlite> create table my_tiny_table ( | |
| ID INT PRIMARY KEY NOT NULL, | |
| PROJECT TEXT NOT NULL, | |
| USER TEXT NOT NULL); | |
| # show all tables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :set ft? #find current syntax/file type | |
| :+,$d #delete all lines after current line | |
| :g/^$/d #delete blank lines | |
| :g/string/d #delete lines with "string" | |
| :g/string/.,+10d #delete 10 lines after match | |
| :g/string/+d3 #delete 3 lines below match | |
| :g/string/d+3 #delete current + 2 lines below | |
| :g/string/d-3 #delete current + 2 lines above | |
| :10,100d #delete lines 10 to 100, included | |
| :%!column -t #makes nice columns, very useful for logs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sed -n '32,39p' file1 > file2 #copies lines betn 32-39 into file2 | |
| sed -i 's/original/new/g' file #search and replace 'orignal' with 'new' | |
| sed -i '/^$/d' *.txt #remove empty lines in place in .txt files | |
| find . -type f -exec sort -o {} {} \; #sort all the files in place | |
| find . -name '*.txt' -exec sort -o {} {} \; #will sort only .txt files | |
| ls -1 #print list in 1 column | |
| zgrep #grep in .gz file | |
| grep -v #inverted grep | |
| grep -s #suppress no file found error | |
| grep -B 5 #print 5 lines before match |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias home 'cd /my/disk/path/' | |
| alias myname 'set prompt = "\n%{%}%m:%~>\n>>"' | |
| alias c 'clear' | |
| alias g gvim | |
| alias h 'history' | |
| alias j 'jobs -l' | |
| alias hg 'history|grep ' | |
| alias psg 'ps -ef | grep' | |
| alias .. 'cd ..' | |
| alias cd.. 'cd ..' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $myName = "Abhishek" | |
| $myHome = "&destinations=PutYourDestinationHere" | |
| $myWork = "&origins=PutYourOriginHere" | |
| $mapsKey = "&key=GetAKeyFromGoogleMapsAPI" | |
| $departTime = "&departure_time=now" | |
| $mapApiUrl = "https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial" | |
| $finalUrl = "$mapApiUrl$myWork$myHome$departTime$mapsKey" | |
| $shortUrl = "ShortenedURLofRoute" # this is shortened URL of google maps route | |
| #$final_url |
NewerOlder