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 / pagination_helper.rb
Last active October 1, 2018 18:34
For this exercise you will complete the PaginationHelper class, which is a utility class helpful for querying paging information related to an array.
#
# I have to admit this is my first time using ruby and I find the syntax very easy and appealing.
#
# A simple PaginationHelper utility class
#
# Gerard Lee <gerarldlee@gmail.com>
# Oct 1, 2018
class PaginationHelper
https://fpira.com/blog/2016/04/install-php-raspberry-pi/
#!/bin/bash
# credits: http://stackoverflow.com/questions/31280912/how-to-install-php-5-6-on-raspbian-wheezy
### VARIABLES ###
# type here the specific php 5.x version you want to install
PHP_VERSION="5.6.20"
@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
@gerarldlee
gerarldlee / Installing Kali Linux as a Windows 10 Subsystem for Linux
Created January 21, 2018 01:15
Installing Kali Linux as a Windows 10 Subsystem for Linux
Installing Kali Linux as a Windows 10 Subsystem for Linux
Powershell (Admin)
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
lxrun /install
git clone https://github.com/RoliSoft/WSL-Distribution-Switcher.git
cd WSL-Distribution-Switcher
python get-prebuilt.py kalilinux/kali-linux-docker
Story:
My hdd is 1tb but i bought a 256gb ssd. I partitioned it accordingly:
140gb windows
50gb ubuntu
50gb fedora
1gb linux boot
250mb efi system
I want to move operating system files to ssd to make my development env faster, and my documents to hdd.
Bumblebee on Ubuntu 16.04
Remove the default Nvidia driver:
sudo apt-get remove xserver-xorg-video-nouveau
Install Bumblebee, primus, and nvidia drivers
sudo add-apt-repository ppa:graphics-drivers/ppa
Fedora 25 XFCE comes with no screensaver. Here's how:
sudo dnf install xscreensaver-extras xscreensaver-extras-base xscreensaver-gl-base xscreensaver-gl-extras
Install dependencies
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs
NOTE for nodejs dependency, you can omit it if its already installed on your home directory (which is a better alternative than installing Node on root directory)
Installing Node on home directory requires Linuxbrew
Using rbenv:
cd
Installing Oracle Virtualbox 5.1.14
On Fedora 25
Root access:
sudo -i
Add Virtualbox repo to Yum / Dnf:
cd /etc/yum.repos.d
wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo