Skip to content

Instantly share code, notes, and snippets.

@lukaszewczak
lukaszewczak / Docker
Created December 4, 2017 10:04 — forked from mitchwongho/Docker
Docker 'run' command to start an interactive BaSH session
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash
@lukaszewczak
lukaszewczak / portable-node.md
Created November 23, 2017 11:52 — forked from domenic/portable-node.md
Tips for Writing Portable Node.js Code

Node.js core does its best to treat every platform equally. Even if most Node developers use OS X day to day, some use Windows, and most everyone deploys to Linux or Solaris. So it's important to keep your code portable between platforms, whether you're writing a library or an application.

Predictably, most cross-platform issues come from Windows. Things just work differently there! But if you're careful, and follow some simple best practices, your code can run just as well on Windows systems.

Paths and URLs

On Windows, paths are constructed with backslashes instead of forward slashes. So if you do your directory manipulation

docker run -p 5432:5432 -v c:/data:/var/lib/postgresql/data postgres
version: '2'
services:
postgres:
image: postgres
volumes:
- postgresql-volume:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=rw_dev
docker volume create --name postgresql-volume -d local
@lukaszewczak
lukaszewczak / docker-compose-invalid.yml
Created September 30, 2016 10:37
docker-compose-invalid.yml
version: '2'
services:
postgres:
image: postgres
volumes:
- c:/Users/Łukasz/dbdata:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=rw_dev
@lukaszewczak
lukaszewczak / make.sh
Created June 9, 2016 11:09 — forked from artzub/make.sh
Install JetBrains Hub + YouTrack + UpSource + Nginx
#!/bin/bash
apt-get install mc htop git unzip wget curl -y
echo
echo "====================================================="
echo " WELCOME"
echo "====================================================="
echo
echo "Hub"
import {Component} from 'angular2/core';
import {Hero} from './hero'
@Component({
select: 'my-hero-detail',
template: `
<div *ngIf="hero">
<h2>{{hero.name}} details!</h2>
<div><label>id: </label>{{hero.id}}</div>
<div>
@lukaszewczak
lukaszewczak / gist:695cf5c84d960a452133
Created February 22, 2016 15:04 — forked from sl4m/gist:5091803
create self-signed certificate for localhost
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key