Skip to content

Instantly share code, notes, and snippets.

@chrisRedwine
chrisRedwine / pip_install
Created July 20, 2016 18:00
Pip install a specific github repo tag or branch
# From https://coderwall.com/p/-wbo5q/pip-install-a-specific-github-repo-tag-or-branch
pip install -e git://github.com/{ username }/{ reponame }.git@{ tag name }#egg={ desired egg name }
@chrisRedwine
chrisRedwine / environment.yml
Last active July 17, 2016 05:20
Conda environment.yml with pip requirements
# From http://stackoverflow.com/questions/35245401/combining-conda-environment-yml-with-pip-requrements-txt
# run: conda env create --file environment.yml
name: test-env
dependencies:
- python>=3.5
- anaconda
- pip
- pip:
- http://www.lfd.uci.edu/~gohlke/pythonlibs/bofhrmxk/opencv_python-3.1.0-cp35-none-win_amd64.whl
@chrisRedwine
chrisRedwine / pd.css
Last active May 17, 2023 11:32
Pandas CSS for Jupyter Notebooks
body {
margin: 0;
font-family: Helvetica;
}
table.dataframe {
border-collapse: collapse;
border: none;
}
table.dataframe tr {
border: none;
export GIT_AUTHOR_DATE="Thu Jul 07 19:43:04 2016 -0500"
export GIT_COMMITTER_DATE="Thu Jul 07 19:43:04 2016 -0500"
git commit -m "My Commit Message"
@chrisRedwine
chrisRedwine / robocopy.bat
Created July 1, 2016 05:17
Robocopy with sensible options
robocopy "src/path" "dst/path" /MIR /COPY:DAT /MT:16 /W:10
@chrisRedwine
chrisRedwine / ng_promise_chain.js
Created June 30, 2016 22:42
Use AngularJS $q service to chain multiple promises together
var promise1 = {}; //something that returns a promise, like $http.get(...)
vra promise2 = {}; //something that returns a promise, like $http.get(...)
$q.all([promise1, promise2])
.then(function success(response) {
console.log(response.data);
}, function failure(response) {
alert('Error!');
console.log(response);
});
@chrisRedwine
chrisRedwine / findstr.bat
Last active March 19, 2024 09:33
Windows command to recursively search for a string in a directory and output results to txt file (s = recursive, i = case insensitive, n = line number detail)
findstr /sin “searchstring” *.* > output.txt
@chrisRedwine
chrisRedwine / pip_install_trusted_host
Last active March 22, 2023 11:11
Pip install trusted host
pip install --index-url http://pypi.python.org/simple --trusted-host pypi.python.org pymongo
@chrisRedwine
chrisRedwine / msdn_sproc_template_with_comments.sql
Last active September 16, 2017 03:05
T-SQL Stored Procedure Template from MSDN (with comments)
--Procedure: schema_name.stored_procedure_name --<<EDIT stored_procedure_name
CREATE PROCEDURE schema_name.stored_procedure_name --<<EDIT stored_procedure_name
/**
* @ParameterOne DATATYPE --<<EDIT parameters
* ,@ParameterTwo DATATYPE
* ,...
**/
AS
--Configure pertinent session options
SET XACT_ABORT OFF;