Skip to content

Instantly share code, notes, and snippets.

View allanesquina's full-sized avatar
💭
New horizon!

Allan Esquina allanesquina

💭
New horizon!
View GitHub Profile
@allanesquina
allanesquina / config
Created June 30, 2015 01:59
i3 config file
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
// Creating the matrix;
var matrix = [];
for(var i=0; i<3; i++) {
matrix[i] = [0,0,0];
}
function validate() {
// check result row
var row = matrix.map(function (row) {
@allanesquina
allanesquina / prototypal_inheritance.js
Last active December 15, 2016 23:50
A simple example of JavaScript prototypal inheritance
// Person class
function Person(name) {
this.name = name;
}
// Adding getName method to its prototype
Person.prototype.getName = function () {
return this.name;
}
@allanesquina
allanesquina / init.sh
Created December 19, 2017 13:32
init.sh
sudo apt-get update
sudo apt-get -y 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 libv8-dev libcurl3-dev nodejs ssh libgmp3-dev libmysqlclient-dev libpq-dev libev-dev libgdbm-dev libncurses5-dev automake libtool bison
#git
sudo apt-get install git
#terminator
sudo apt-get install terminator
@allanesquina
allanesquina / create-ssl-cert.sh
Created April 8, 2020 21:48 — forked from ArnaudValensi/create-ssl-cert.sh
Generate a self signed certificate without passphrase for private key
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 10000 -nodes
services:
php:
...
links:
- db
db:
...
links:
- php
// List of pieces
const PIECES_LIST = [
{
id: 1,
size: { col: 6, row: 2 },
length: 1,
},
{
id: 2,
size: { col: 2, row: 2 },