Skip to content

Instantly share code, notes, and snippets.

View ronaldokun's full-sized avatar
🏠
Working from home

ronaldokun

🏠
Working from home
View GitHub Profile
@ronaldokun
ronaldokun / gist:08fa4ba1b4ed5ffafbefa8d67e349f00
Created February 21, 2018 03:19
Fix PRIME profiles in X Server Settings
Use this command in the Terminal to create a nvidia-graphics-drivers.conf file:
`gksudo xed /etc/modprobe.d/nvidia-graphics-drivers.conf`
In the opened empty file, add these lines:
```
blacklist nouveau
options nouveau modeset=0
```
@ronaldokun
ronaldokun / -
Created February 20, 2018 04:02 — forked from anonymous/-
System: Host: Vostro-5470 Kernel: 4.4.0-53-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.2.7 (Gtk 3.18.9-1ubuntu3.3) dm: mdm Distro: Linux Mint 18.1 Serena
Machine: System: Dell (portable) product: Vostro 5470 Chassis: type: 8 v: 0.1
Mobo: Dell model: 019TFD v: A01 Bios: Dell v: A11 date: 01/21/2015
CPU: Dual core Intel Core i5-4210U (-HT-MCP-) cache: 3072 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 9577
clock speeds: min/max: 800/2700 MHz 1: 1699 MHz 2: 1700 MHz 3: 1699 MHz 4: 1699 MHz
Graphics: Card-1: Intel Haswell-ULT Integrated Graphics Controller bus-ID: 00:02.0 chip-ID: 8086:0a16
Card-2: NVIDIA GK208M [GeForce GT 740M] bus-ID: 09:00.0 chip-ID: 10de:1292
Display Server: X.Org 1.18.4 driver: nvidia Resolution: 1366x768@60.06hz
@ronaldokun
ronaldokun / conda-env-file.sh
Created February 8, 2018 04:21
Create an environment.yml file with the name of the directory project
function conda-env-file {
# Create conda environment.yml file and autoenv activation file
# based on directory name.
autoenvfilename='.env'
condaenvfilename='environment.yml'
foldername=$(basename $PWD)
if [ ! -f $condaenvfilename ]; then
printf "name: $foldername\ndependencies:\n- pip\n- python\n- anaconda\n" > $condaenvfilename
@ronaldokun
ronaldokun / gist:b6b2033d113b913cb284454870546762
Last active January 24, 2018 12:50 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
Switching remote URLs from HTTPS to SSH
Open Terminal (for Mac and Linux users) or the command prompt (for Windows).
Change the current working directory to your local project.
List your existing remotes in order to get the name of the remote you want to change.
```
git remote -v
$ origin https://github.com/USERNAME/REPOSITORY.git (fetch)
$ origin https://github.com/USERNAME/REPOSITORY.git (push)
```