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 / download_bars.py
Created May 22, 2024 07:28 — forked from wrighter/download_bars.py
A command line utility to download historical data from Interactive Brokers
#!/usr/bin/env python
import os
import sys
import argparse
import logging
from datetime import datetime, timedelta
from typing import List, Optional
from collections import defaultdict
Registered Name: https://zhile.io
License Key: 48891cf209c6d32bf4
@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 <[email protected]>
# 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