Skip to content

Instantly share code, notes, and snippets.

Avatar

Dimitrios Mistriotis dimitrismistriotis

View GitHub Profile
@dimitrismistriotis
dimitrismistriotis / setup_nginx
Created Apr 14, 2020
Latest nginx from repositories for Ubuntu script, for automatic deployment
View setup_nginx
#!/bin/bash
# ___ _ _ _ _ __ __
# / __| ___| |_ _ _ _ __ | \| |__ _(_)_ _ \ \/ /
# \__ \/ -_) _| || | '_ \ | .` / _` | | ' \ > <
# |___/\___|\__|\_,_| .__/ |_|\_\__, |_|_||_/_/\_\
# |_| |___/
#
# References:
#
# * https://www.nginx.com/resources/wiki/start/topics/tutorials/install/
@dimitrismistriotis
dimitrismistriotis / README.md
Created Mar 4, 2018
Learning Scala snippets - When NTT (aka God) told someone to foff
@dimitrismistriotis
dimitrismistriotis / Vagrantfile
Last active Mar 10, 2017
Deploy Rails application
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.provider "docker"
# The most common configuration options are documented and commented below.
@dimitrismistriotis
dimitrismistriotis / README.md
Last active Jun 4, 2017
The number of Greeks who moved abroad during the crisis
View README.md
@dimitrismistriotis
dimitrismistriotis / checklist.md
Last active Apr 11, 2020
Migrating to new Linux checklist
View checklist.md
@dimitrismistriotis
dimitrismistriotis / Readme.md
Last active Feb 23, 2016
A visualisation makeover
View Readme.md

"Makeover" Assignment for Udacity's "Data visualisation and D3.js"

Decided to makeover: http://viz.wtf/post/139307186583/i-wonder-if-they-all-have-a-different-filling/embed

After some experimentation, dropped pie chart and went for a bar then:

  • One colour (all items express currency)
  • Order by spending volume
  • Added spending to bars and removed grids
  • In order of not losing information from original chart which had a total, added total spend on header (not visible in image).
View getJoinedArrayText.js
/**
* Returns array join in a more natural language style by adding commas and
* having the last item prefixed with "and".
* Examples:
*
* getJoinedArrayText(['1'])
* "1"
* getJoinedArrayText(['1', '2'])
* "1 and 2"
* getJoinedArrayText(['1', '2', '3'])
View delete_all_tables_heroku_db.zsh
#!/bin/zsh
#
# Inspired from
# http://stackoverflow.com/questions/3327312/drop-all-tables-in-postgresql
# and modified for heroku CLI.
#
if [[ $# -ne 1 ]]; then
echo "Supply heroku app as first argument" >&2
@dimitrismistriotis
dimitrismistriotis / Preferences.sublime-settings
Last active Aug 29, 2015
My sublime text preferences (they get overwritten when JSON doesn't parse)
View Preferences.sublime-settings
{
"color_scheme": "Packages/User/Monokai (SL).tmTheme",
"font_size": 12,
"ignored_packages": ["Vintage", "Markdown"],
"rulers": [80, 100],
"soda_folder_icons": true,
"theme": "Soda Dark.sublime-theme",
"trim_trailing_white_space_on_save": true,
"tab_size": 2,
"translate_tabs_to_spaces": true
You can’t perform that action at this time.