Skip to content

Instantly share code, notes, and snippets.

View BonfaceKilz's full-sized avatar
💭
Scheme-ing ❤️

BonfaceKilz BonfaceKilz

💭
Scheme-ing ❤️
View GitHub Profile
@BonfaceKilz
BonfaceKilz / projects.md
Last active March 30, 2020 20:10
Whenever I can squeeze in some time, I'll be streaming these topics.
@BonfaceKilz
BonfaceKilz / tic-tac-toe.org
Created December 16, 2018 12:04
tic-tac-toe game in haskell [Literate Programming]

Building a tic-tac-toe game

This are all the imports in the Main.hs file:

module Main where

import Control.Monad (forever, when)
import Data.Bool     (bool)
@BonfaceKilz
BonfaceKilz / display.sh
Created October 2, 2018 04:19
Set up external display
xrandr --output HDMI1 --auto --right-of eDP1
@BonfaceKilz
BonfaceKilz / nmcli.md
Created July 29, 2018 10:32
Using nmcli to connect to wi-fi
# First searc for availabe networks
nmcli device sifi list

# Connect to device
nmcli device wifi connect <ssid name> password <pass>
@BonfaceKilz
BonfaceKilz / librosa_tevo.py
Last active July 22, 2018 19:05
A fix for some(his) code my friend shared with me
import sys
import librosa
from numpy.linalg import norm
import librosa
from numpy.linalg import norm
from dtw import dtw
from random import shuffle
words = ['open','close']
chosen_word = words[:]
@BonfaceKilz
BonfaceKilz / JupyterNotebookBg.md
Created May 8, 2018 16:29
Running jupyter notebook on the background
nohup jupyter notebook &
# When you want to kill it:
lsof nohup.out
kill -9 <PID>
@BonfaceKilz
BonfaceKilz / matlab_kernel_setup.md
Last active May 1, 2018 17:02
Creating a virtualenv for jupyter to run python3.5
virtualenv -p /usr/bin/python3.5 py35
source py35/bin/activate
# For the first time run:
# pip install jupyter
# pip install matlab_kernel
jupyter               # Jupyter running Python 3.5
deactivate            # Leave virtualenv
@BonfaceKilz
BonfaceKilz / grids.md
Last active March 9, 2018 10:27
A quick primer on css grids

A handy of using css grids:

.grid-container {
  display: grid;
  grid-template-columns: 100px 100px 100px;
  grid-template-rows: 50px 50px;
}

// Alternatively
@BonfaceKilz
BonfaceKilz / ER_Diagram.md
Created March 4, 2018 11:32
Generating a ER Diagram from mysql workbench

Steps to create ER Diagram of an existing database using MySQL Workbench

  1. Open your MySQL workbench and click on Database
  2. Click on Reverse Engineer
  3. Select your database connection and click on Next.
  4. Click on Next.
  5. Select the database schema for which you want to create the ER diagram and then click on Next.
  6. After this it will retrieve objects from the selected database and check results,after the blue ticks in similar to the image below appear, click on Next.
  7. Now there will be option to select objects to reverse engineer i.e. the objects for which you want to create the diagram,here I have selected all the options.After selecting objects click on Execute.
  8. Click on Next.
@BonfaceKilz
BonfaceKilz / setup.md
Last active June 21, 2018 13:57
Working with laravel 4.1 (which is no longer supported)

Introduction

I've setup a docker image to work with the laravel 4.1 project and all its dependencies. Working with depracated code can be a nuisance, especially if you run a rolling release distro. You might break stuff in you local machine when downgrading things. Needless to say, it's frustrating. This is a short guide on how to set up and run a docker instance that has everything you need to work on any laravel 4.1 project.

I'll try as much as possible to dockerize things since upgrading the project in a safe way is one of the future goals of this project.

My goal for this was to have a working stable environment that can be replicated anywhere on any machine that has docker installed.

For the initial setup, I've cloned laradock to the repository and set up the initial .env.