Skip to content

Instantly share code, notes, and snippets.

View gerarldlee's full-sized avatar
:octocat:

Gerard Lee gerarldlee

:octocat:
  • gerarldlee
  • Vancouver, BC
View GitHub Profile
@gerarldlee
gerarldlee / conda.sh
Created February 20, 2022 07:23 — forked from rexlow/conda.sh
Install miniconda, tensorflow, keras, theano
bash Miniconda3-latest-MacOSX-x86_64.sh
// append env path
conda install jupyter matplotlib pandas scipy Pillow scikit-learn
conda install -c conda-forge keras tensorflow
// for some reasons tensorflow installed = 1.0.0, update here
@gerarldlee
gerarldlee / install.bash
Created February 14, 2018 07:27 — forked from isc30/install.bash
Raspberry Pi Install PHP7 + Nginx + MySQL + PhpMyAdmin (last versions)
#!/bin/bash
# Thanks to https://gist.github.com/Lewiscowles1986/ce14296e3f5222082dbaa088ca1954f7
if [ "$(whoami)" != "root" ]; then
echo "Run script as ROOT please. (sudo !!)"
exit
fi
echo "deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi" > /etc/apt/sources.list.d/stretch.list
echo "APT::Default-Release \"jessie\";" > /etc/apt/apt.conf.d/99-default-release
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
@gerarldlee
gerarldlee / Liberal Regex Pattern for Web URLs
Created November 8, 2015 20:08 — forked from gruber/Liberal Regex Pattern for Web URLs
Liberal, Accurate Regex Pattern for Matching Web URLs
The regex patterns in this gist are intended only to match web URLs -- http,
https, and naked domains like "example.com". For a pattern that attempts to
match all URLs, regardless of protocol, see: https://gist.github.com/gruber/249502
# Single-line version:
(?i)\b((?:https?:(?:/{1,3}|[a-z0-9%])|[a-z0-9.\-]+[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|s
Font=Powerline Consolas
ForegroundColour=131,148,150
BackgroundColour=0,43,54
CursorColour=220,50,47
Black=7,54,66
BoldBlack=0,43,54
Red=220,50,47
BoldRed=203,75,22
Green=133,153,0
BoldGreen=88,110,117
#!/bin/bash
# Applies the Monokai color scheme to the current terminal session.
declare -A map0
map0=( [foreground ]='#F8F8F2' [background ]='#272822'
[cursor ]='#F8F8F0' [selection ]='#49483E'
[pink ]='#F92672' [green ]='#A6E22E'
[yellow ]='#E6DB74' [blue ]='#66D9EF'
[purple ]='#AE81FF' [orange ]='#FD971F'
[gray ]='#75715E' )
@echo off
cygwin-shim.bat /bin/ansible-galaxy %*