Skip to content

Instantly share code, notes, and snippets.

View grahamcrowell's full-sized avatar

Graham Crowell grahamcrowell

  • Toronto ON Canada
View GitHub Profile
@grahamcrowell
grahamcrowell / use_git.md
Last active May 2, 2017 23:48
Why we should drop Vault use git

Why Vault isn't good enough

single license and floater user

  • who's got it checked out?
  • who / what DR broke it?
  • why did they do that?
  • what were the specs?
  • who tested it?
  • no integration with IDE
@grahamcrowell
grahamcrowell / libcurl.md
Last active May 11, 2024 04:04
libcurl visual studio
  1. build libcurl
  • download source from https://curl.haxx.se/download.html: ..\curl-7.53.1\curl-7.53.1..
  • open visual studio developer command prompt
  • cd to: ..\curl-7.53.1\curl-7.53.1\winbuild
  • nmake /f Makefile.vc mode=dll VC=14 MACHINE=x64
  1. configure visual studio project:
  • set to 64 bit release builds
  • Properties:
    • C/C++ -> Additional Include Directories: ..\curl-7.53.1\curl-7.53.1\builds\libcurl-vc14-x64-release-dll-ipv6-sspi-winssl\include;
  • Linker -> Additional Library Directories: ..\curl-7.53.1\curl-7.53.1\builds\libcurl-vc14-x64-release-dll-ipv6-sspi-winssl\lib;
@grahamcrowell
grahamcrowell / .gitignore
Created June 23, 2017 06:22
.gitignore for scala + sbt + intellij
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries
# Sensitive or high-churn files:
.idea/**/dataSources/
@grahamcrowell
grahamcrowell / net_test.sh
Created October 16, 2017 03:21
shell internet speed test
# script=speedtest.sh && touch $script && sudo chmod 777 $script && vi $script && printf "running: %s\n" $script && ./$script
echo "***********************"
echo "internet speed test..."
echo "***********************"
printf "\n===================================\n"
printf "installing... speedtest-cli\n"
printf "===================================\n"
speedtest-cli --version
# brew install speedtest-cli
@grahamcrowell
grahamcrowell / bash_cheatsheet.md
Last active February 10, 2024 03:00
Terminal General Reference
@grahamcrowell
grahamcrowell / gdiff.md
Last active March 29, 2018 05:08
Graph data structure diff
@grahamcrowell
grahamcrowell / readme.md
Last active April 29, 2018 02:41
Intro to pipenv

Intro to pipenv

How To

Initialize a new project

  • open vscode in the root of the project
  • open terminal in vscode
  • type pipenv shell
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <senko.rasic@dobarkod.hr>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of
@grahamcrowell
grahamcrowell / colorlog.py
Last active March 1, 2024 05:29
python snippet for coloured logging
def config_color_logging():
"""Configure and return a colored console logger.
see https://github.com/borntyping/python-colorlog#usage
see https://docs.python.org/3/library/logging.html#logrecord-attributes
:return: logger
"""
import colorlog