Skip to content

Instantly share code, notes, and snippets.

View nicubarbaros's full-sized avatar
🧔‍♂️

Nicu Barbaros nicubarbaros

🧔‍♂️
View GitHub Profile
@nicubarbaros
nicubarbaros / .bash
Created June 20, 2017 07:54
Start tornado server with configuration file
python main.py --config-file=config/dev.py server
# Build image from DOCKERFILE
docker build .
# Create container from image
docker run -dit #{image name:key}
# Create docker machine
docker-machine create --driver virtualbox default
@nicubarbaros
nicubarbaros / gist:9a609d2f92319b03200a4396a695fda1
Last active June 2, 2017 14:17
One liner to stop / remove all of Docker containers & images:
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@nicubarbaros
nicubarbaros / fonts.css
Created May 24, 2017 19:57
System fonts
body {
font-family: -apple-system, BlinkMacSystemFont, “Segoe UI”, Roboto, Helvetica, Arial, sans-serif;
font-size: 16px/1.2;
}
@nicubarbaros
nicubarbaros / index.css
Created April 17, 2017 17:49
Fonts that are on user computer, will be rendered depending on the OS. This way we don't need to load any other external fonts.
body {
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;
}
@nicubarbaros
nicubarbaros / index.html
Created April 17, 2017 14:12
Basic html for React apps
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Github Batle</title>
</head>
<body>
<div id="app"></div>
</body>
@nicubarbaros
nicubarbaros / .bash
Created April 16, 2017 20:22
A list of plugins and loaders for REACT
npm install --save-dev babel-core babel-loader babel-preset-env babel-preset-react css-loader style-loader html-webpack-plugin webpack webpack-dev-server
@nicubarbaros
nicubarbaros / _contact_popup.html.haml
Last active February 24, 2017 21:21
Ajaxify your site with remote => true and respond_to block into an pop up modal
= form_for :contact_us, url: contact_board_path, id: 'contact--form', remote: true do |f|
.form--section-content
= f.label :name_surname
= f.text_field :name_surname, required: true
.form--section-content
= f.label :email
= f.text_field :email, required: true, type: 'email'
.form--section-content
= f.label :message
= f.text_area :message, required: true