-
repo -> repository
-
clone
-> bring a repo down from the internet (remote repository like Github) to your local machine -
add
-> track your files and changes with Git -
commit
-> save your changes into Git -
push
-> push your changes to your remote repo on Github (or another website) -
pull
-> pull changes down from the remote repo to your local machine -
status
-> check to see which files are being tracked or need to be commited -
init
-> use this command inside of your project to turn it into a Git repository and start using Git with that codebase
This file contains 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
#!/usr/bin/env python | |
""" | |
Very simple HTTP server in python (Updated for Python 3.7) | |
Usage: | |
./dummy-web-server.py -h | |
./dummy-web-server.py -l localhost -p 8000 | |
Send a GET request: |
This file contains 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 requests | |
CRLF = '\r\n' | |
DEFAULT_HTTP_VERSION = 'HTTP/1.1' | |
class RequestParser(object): | |
def __parse_request_line(self, request_line): | |
request_parts = request_line.split(' ') |
This file contains 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
SELECT * FROM V$VERSION; --get current Oracle instance version | |
--for Oracle 10g | |
--get total size in MB for current user | |
SELECT sum(bytes)/1024/1024 size_in_mb FROM DBA_SEGMENTS | |
WHERE OWNER='<user_name>'; | |
--DBA_SEGMENTS describes the storage allocated for all segments in the database. | |
--related view: USER_SEGMENTS describes the storage allocated for the segments | |
--owned by the current user's objects. | |
--This view does not display the OWNER, HEADER_FILE, HEADER_BLOCK, or RELATIVE_FNO columns. |
This file contains 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 java.util.ArrayList; | |
import java.util.List; | |
public class Solution { | |
//普通两个数组的点乘 | |
public int dotProduct(int[] a, int[] b) { | |
int len = a.length; | |
int res = 0; | |
for (int i = 0; i < len; i++) { |
This file contains 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
# Build a Python extension module using pybind11 | |
# pybindings_add_module(<module>) | |
# Here <module> should be the fully qualified name for the module, | |
# e.g. pybindings_add_module(foo.bar._baz) | |
# <module> becomes the target name in case you wish to do something to it later | |
# The source for the binding *must* be placed in src/pybindings/{relpath}/py{name}.cc | |
# E.g. for module=foo.bar._baz -> src/pybindings/bar/py_baz.cc | |
function(pybindings_add_module module) | |
set(target_name ${module}) | |
string(REPLACE "." "/" modpath ${module}) |
This file contains 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
using System; | |
using System.Text; | |
using System.Security.Cryptography; | |
using System.Web.Script.Serialization; | |
using System.Collections.Generic; | |
namespace Aes256CbcEncrypterApp { | |
class MainClass { | |
public static void Main(string[] args) { | |
Console.WriteLine("Hello, world!"); |
This file contains 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
""" | |
Implements a simple HTTP/1.0 Server | |
""" | |
import socket | |
def handle_request(request): | |
"""Handles the HTTP request.""" |
This file contains 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
""" | |
Author: Jonathan Cardasis | |
""" | |
import socket | |
import signal # Allow socket destruction on Ctrl+C | |
import sys | |
import time | |
import threading |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Net; | |
using System.Net.Mail; | |
using DomainClasses; | |
using System.IO; |
NewerOlder