This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// List of pieces | |
const PIECES_LIST = [ | |
{ | |
id: 1, | |
size: { col: 6, row: 2 }, | |
length: 1, | |
}, | |
{ | |
id: 2, | |
size: { col: 2, row: 2 }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
php: | |
... | |
links: | |
- db | |
db: | |
... | |
links: | |
- php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 10000 -nodes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Person class | |
function Person(name) { | |
this.name = name; | |
} | |
// Adding getName method to its prototype | |
Person.prototype.getName = function () { | |
return this.name; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Object construcion exemple | |
function MyClass() { | |
this.myProperty = 'foo'; | |
} | |
// Whitout new | |
var myInstance = {}; | |
MyClass.call( myInstance ); | |
console.log( 'without ' + myInstance.myProperty ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir fromftp | |
sudo curlftpfs -o allow_other ftp://user:pass@hostname /home/fromftp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Single file (-P = ssh port) | |
sudo scp -P 21 root@server:/var/log/nginx/access.log /home/Downloads/ | |
# Recursive | |
sudo scp -r -P 21 root@server:/var/log/nginx/ /home/Downloads/ |
NewerOlder