Skip to content

Instantly share code, notes, and snippets.

@chamoysvoice
chamoysvoice / codeship-laravel-mysql-5-7.sh
Created October 8, 2018 21:44
This is a configuration file to use mysql 5.7 in codeship for laravel projects :)
#Install mysql 5.7.16
\curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/packages/mysql-5.7.sh | bash -s
export PATH=/home/rof/mysql-5.7.17/bin:$PATH
# Optional: Set the php version
phpenv local 7.1
mkdir -p ./bootstrap/cache
mysql --defaults-file="/home/rof/mysql-5.7.17/my.cnf" -u "${MYSQL_USER}" -p"${MYSQL_PASSWORD}" -e "create database codeship";
@chamoysvoice
chamoysvoice / k-list-heap-merge.py
Last active July 4, 2016 16:11
Merge k sorted lists into a sorted list in O(n lg k), HINT: use a min-heap, *CORMEN Introduction to Algorithms exercise
from math import floor
class Heap:
def __init__(self):
self.nodes = list()
self.heap_size = -1
def __left(self, i):
return i * 2 + 1
@chamoysvoice
chamoysvoice / jsonview-monokai.css
Last active December 6, 2018 17:46
JSON View monokai theme for Chrome Extension
body {
white-space: pre;
font-family: monospace;
font-size: 1.2em; /* I like big fonts, if you don't remove this line */
background: #272822;
color: #f8f8f2;
}
.property {
font-weight: auto;